LogIn
I don't have account.
Original text
0 lines · 0 words · 0 characters
Changed text
0 lines · 0 words · 0 characters
Differences
Paste or open two texts above, or press Try example, to see the differences here.
🔒 Everything runs in your browser. Your texts and files are never uploaded to a server.
About this tool

Diff Checker - Compare Text Online

Compare two texts or files and see every difference highlighted line by line, with the exact words and characters that changed. Switch between side-by-side, unified and inline views, ignore whitespace or case, merge changes and download a Git-style patch.

  • 100% free
  • No sign-up
  • Runs in your browser
  • Side-by-side & unified
  • Word & character level
  • Merge & export patch

What Is a Diff Checker?


A diff checker (also called a text compare or difference checker) compares two versions of a text and shows exactly what changed: which lines were removed, which were added and which words or characters inside a line were edited.

DevBrainiac's Diff Checker is a free online tool to compare text, code and files side by side, merge changes and export a patch, all in your browser.

Key facts

  • A diff checker compares two versions of a text and lists the lines that were removed, added or changed.
  • This tool highlights changes line by line and, inside each changed line, word by word or character by character.
  • It has 3 views (side by side, unified, inline text) and 4 highlight levels.
  • It can ignore case, whitespace, blank lines, line endings and any text or regex you choose and it detects moved lines.
  • You can merge changes between the two sides and download a Git-compatible unified diff.
  • Everything runs in your browser; your texts and files are never uploaded.

Last updated:

How to Compare Two Texts Online


  1. Add the original text: Paste the older version into the left box, or press Open file or drop a file on it. Code, logs, CSV, JSON, Markdown and plain text all work.
  2. Add the changed text: Paste the newer version into the right box the same way. The two sides can have different lengths.
  3. Read the highlighted differences: Removed lines are red, added lines are green and moved lines are blue. Inside a changed line, the exact words or characters that changed are marked more strongly.
  4. Adjust the comparison: Switch between side-by-side, unified and inline text views, pick Smart, word or character highlighting and ignore case, whitespace, blank lines or your own patterns.
  5. Merge or export: Use the → and ← arrows to copy a change to the other side, then download the edited text, a .diff patch or an HTML report, or copy a link that opens the comparison.

Diff Checker Features


One free tool that works as a diff checker, text compare tool, code diff, file comparison tool and patch generator.

Side-by-Side and Unified Views

See the original and changed text next to each other, or in one Git-style column with - and + lines. An inline view marks changes inside running text for prose.

Word and Character Highlighting

Smart mode marks single characters when a word was only edited and whole words when it was replaced. Word and character modes lock it to one level.

Ignore Whitespace, Case and Blank Lines

Ignore leading and trailing spaces, changes in the amount of whitespace, all whitespace, letter case, blank lines and CRLF / LF line endings.

Custom Ignore Rules

Skip timestamps, build numbers, session IDs or any text with plain-text or regular-expression rules, so only meaningful changes remain.

Moved Line Detection

Lines that were moved rather than edited are shown in blue, so a reordered file does not look like a rewrite.

Merge Changes

Copy any change from one side to the other with one click, with undo, then download the merged result.

Hide Unchanged Lines

Collapse long unchanged sections to 0, 1, 3, 5 or 10 lines of context and expand any section when you need it.

Git-Style Patch and HTML Report

Download a unified diff that git apply and patch accept, or a standalone HTML report to share with your team.

Files, Links and Privacy

Open or drop files up to 20 MB, swap sides, jump between changes and share a link that contains both texts. Nothing is uploaded.

How to Read the Results


What you seeMeaning
Red lineThe line exists only in the original text (removed).
Green lineThe line exists only in the changed text (added).
Red and green line side by sideThe line was edited; the darker marks show the exact words or characters that changed.
Blue lineThe line was moved: removed in one place and added unchanged in another.
Striped cellThe other side has no line here.
Grey italic lineA blank line that is ignored because Ignore blank lines is on.

Comparison Options


OptionChoicesUse it when
ViewSide by side, Unified, Inline textSide by side for reading, unified for code review, inline text for prose and documents.
HighlightSmart, Word, Character, Line onlyCharacter level for IDs, hashes and numbers; word level for sentences; line only for a quick overview.
WhitespaceCompare whitespace, Ignore leading / trailing, Ignore changes in amount, Ignore all whitespaceEverything is highlighted because of indentation, tabs vs spaces or trailing spaces.
Ignore case / blank linesOn or offOnly letter case or empty lines changed.
Ignore rulesPlain text or /regex/Logs or generated files with a timestamp on every line.
Sort lines firstOn or offComparing two lists where the order does not matter.
Hide unchanged lines0, 1, 3, 5 or 10 lines of contextA long file with only a few changes.

Unified Diff Format Explained


The patch this tool exports uses the unified diff format, the same as git diff and diff -u. Here, port and debug changed and a log line was added:

--- a/app.conf
+++ b/app.conf
@@ -1,3 +1,4 @@
 host = localhost
-port = 3000
-debug = true
+port = 8080
+debug = false
+log = info
  • --- and +++ name the original and the changed file.
  • @@ -1,3 +1,4 @@ is a hunk header: 3 lines from line 1 of the original become 4 lines from line 1 of the changed file.
  • Lines starting with - were removed, + were added and a space means unchanged context.

What People Compare


Developers

  • Compare two versions of a config file before a deploy
  • Find the field that changed between two API responses
  • Review a code snippet outside a pull request
  • Create a patch to send to a teammate

Writers and editors

  • See exactly which sentences changed between two drafts
  • Check a copy edit against the version you submitted
  • Spot silent edits in a published article

Data and operations

  • Compare two CSV exports to find added or removed rows
  • Check a list against an updated one, in any order, with Sort lines first
  • Diff two log files while ignoring timestamps
  • Compare environment variable dumps from two servers

Tips for a Cleaner Comparison


  • Everything is highlighted: it is usually indentation or tabs vs spaces. Choose a whitespace option.
  • Every line differs by a timestamp: add an ignore rule such as /\d{2}:\d{2}:\d{2}/.
  • A long file with a few changes: turn on Hide unchanged lines and use Prev / Next to jump between changes.
  • A change you can see but not find: switch the highlight to Character.
  • Comparing JSON: format both sides first, or use the JSON Compare tool, which compares by structure.

Frequently Asked Questions


What is a diff checker?

A diff checker is a tool that compares two pieces of text and shows the differences between them: lines that were removed, lines that were added and lines that were changed. The name comes from the Unix diff command.

How do I compare two text files online?

Paste or open the original file on the left and the changed file on the right. The differences appear immediately below, with removals in red and additions in green. Open file and drag and drop both work and nothing is uploaded.

Is this diff checker free and private?

Yes. It is free, needs no sign-up and runs entirely in your browser, so your texts and files are never sent to a server. A share link stores both texts inside the link itself.

What is the difference between side-by-side and unified diff?

A side-by-side diff shows the original on the left and the changed text on the right, which is easiest to read. A unified diff shows one column where removed lines start with - and added lines with +; it is the format used by Git and code review tools.

How do I ignore whitespace or case differences?

Choose a whitespace option (ignore leading and trailing spaces, changes in amount, or all whitespace) and tick Ignore case. Line endings (CRLF vs LF) are never counted as changes and a note tells you when they differ.

Can I ignore timestamps or IDs that change on every line?

Yes. Open Ignore rules and add one rule per line: plain text, or a regular expression such as /\d{4}-\d{2}-\d{2}T[\d:.]+Z/ for ISO timestamps. Matching text is removed before the lines are compared.

What does the Smart highlight do?

Smart highlighting picks the clearest level for each change: if a word was only edited, it marks the changed characters (for example 1.4.2 to 1.5.0); if a word was replaced, it marks the whole word.

How do I create a patch file from two texts?

Compare the texts, then use Copy patch or Download .diff in the Unified diff (patch) panel. The file is a standard unified diff that you can apply with git apply devbrainiac-changes.diff or patch -p1 < devbrainiac-changes.diff.

Is there a size limit?

Files up to 20 MB can be opened. Texts up to about 1 million characters are compared as you type; larger ones are compared when you press Compare. Very different large texts are simplified after a couple of seconds so the page stays responsive.

Which algorithm does the diff checker use?

It uses the Myers O(ND) difference algorithm, the same family of algorithm used by Git and GNU diff, to find the smallest set of line changes, then runs it again on words or characters inside changed lines.

Related Developer Tools