Compare text and code online

Paste or drop two versions below. Differences show up as you type, and nothing leaves your browser unless you share it. How it works

Original
0 lines
Drop to load into original
Changed
0 lines
Drop to load into changed
−0+0
Original
Changed
Nothing to compare yetPaste or drop text into both panes above. The differences appear here as you type.
Free online diff checker

Compare two texts and see what changed, line by line.

Paste two versions of a document, a config file or some code. Text Comparer lines them up and marks every addition, removal and edited word, right in your browser. No sign-up, and nothing is uploaded.

No sign-up Texts stay in your browser 29 languages
greeting.js
What it does

Everything a careful comparison needs, nothing it doesn't.

Side by side, or in one column

Split view lines the two versions up next to each other. Unified view reads top to bottom, the way a patch does.

The exact words that changed

Inside a changed line, the words that differ are marked, so a renamed variable stands out. Switch to characters to catch a single changed digit or comma.

Highlighting for 29 languages

JSON, Python, JavaScript, SQL, YAML, C# and more. Open a file and the syntax is picked from its extension.

Unchanged lines fold away

Long stretches that are the same on both sides collapse to one row. Choose how much context to keep, and open any fold when you need it.

Ignore what doesn't matter

Ignore whitespace, letter case or blank lines when they are just noise, or sort both sides first to compare lists where order does not matter.

Nothing gets lost

Comparisons save in your browser with no account. Replacing text, clearing a pane or opening a sample over your work always asks first or offers Undo.

Share links that expire

Send a read-ready link that lasts a day, a week, a year or for good, and revoke it from the library at any time.

Take the result anywhere

Copy a unified diff, download a .diff patch or a standalone HTML page, or print straight to PDF.

How it works
  1. Paste or drop

    Put the older version on the left and the newer one on the right. Files up to 10 MB open directly.

  2. Choose how to look

    Pick split or unified, the syntax, and whether to fold or ignore whitespace and case.

  3. Walk the changes

    Use the arrows, or Alt + ↓ and Alt + ↑, to move from one change to the next.

  4. Keep it

    Save it in the browser with Ctrl + S, share a link, or export it as a patch, HTML or PDF.

Samples

Compare code in your language.

Each sample opens the comparer with two versions already filled in, with tips for comparing that kind of file: JSON, Python, SQL, YAML, HTML and more.

Questions

Comparing text online: common questions.

How do I compare two texts online?

Paste the older version into the Original pane and the newer one into the Changed pane, or drop a file onto each. The differences appear straight away: removed lines in red, added lines in green, and the exact words that changed are marked inside each line. Use the arrows or Alt + ↓ to jump from one change to the next.

Is Text Comparer free, and do I need an account?

It is free and there is nothing to sign up for. Every feature, including saving, sharing and exporting, works without an account.

Are my texts uploaded to a server?

No. The comparison runs entirely in your browser, and saved comparisons are kept in your browser’s own storage. Text only leaves your device when you create a share link, which stores that one comparison on our server until it expires or you revoke it.

Can I compare files instead of pasting text?

Yes. Use the file button on either pane or drag a file onto it, up to 10 MB per file. Drop two files at once to fill both sides. The syntax highlighting is picked from the file extension, and if the two files use different line endings (CRLF and LF) you are told, without those endings being counted as changes.

Can it ignore whitespace, letter case or blank lines?

Yes. Ignore whitespace treats lines that only differ in spaces or tabs as equal, Ignore case does the same for capitalisation, and Ignore blank lines (under More) stops added or removed empty lines from showing up as changes. You can also sort lines before comparing, which helps with lists where the order does not matter.

Which languages get syntax highlighting?

Twenty-nine programming and markup languages, including JSON, JavaScript, TypeScript, Python, Java, C, C++, C#, Go, Rust, Ruby, PHP, SQL, HTML, XML, CSS, SCSS, YAML, Markdown, Dockerfile and PowerShell, plus plain text.

How do I share a comparison?

Press Share, choose how long the link should last (from one day to never), and copy the link or send it to X, LinkedIn, Reddit, WhatsApp, Telegram or email. Links you create are listed under My links in the library, where you can revoke them at any time.

Can I export the differences?

Yes. From the menu next to Share you can copy a unified diff, download a .diff patch file, download a standalone HTML page of the comparison, or print it and save it as a PDF.

Where are saved comparisons kept, and can I move them?

In your browser, on this device. Use Back up in the library to download all of them as one JSON file, and Restore to load that file in another browser. Restoring never overwrites a comparison you already have.

Does it work on a phone?

Yes. On small screens the panes stack and the diff switches to the single-column unified view, which is easier to read on a narrow display. For long files a larger screen is still more comfortable.

How do I report a problem or suggest a feature?

Use Send feedback in the menu on the comparer, or write to [email protected]. Every message is read by the person who builds the tool.