Text Diff Checker — Compare two texts and see exactly what changed.

Paste an original and a changed version and see what was added and removed, by line, word or character. View the result side by side or inline, ignore case and extra spaces, hide unchanged lines, and copy or download the diff. Both texts are compared in your browser and never uploaded.

Compare two texts Compared in your browser
Text diff checker showing added and removed lines side by side

Your texts

Paste two texts to compare them.

Differences

0Added lines
0Removed
0Unchanged
—Similarity
The guide

Text Diff Checker Guide: Compare Lines, Words and Characters

Learn how to read a diff, when to compare by lines, words or characters, and how to get a clean comparison.

A simple explanation

What is a text diff checker?

A text diff checker compares two versions of a text and shows exactly what changed. Lines, words or characters that were added are marked in green, and the ones that were removed are marked in red.

Writers use it to review edits, developers use it to compare code and configuration files, and anyone can use it to check whether two copies of a document really match. If the two texts differ only in stray spaces, clean them first with the Whitespace Remover, and use the Text Sorter to put two lists in the same order before comparing.

Common reasons to compare text

Why People Compare Texts

Edits and drafts

See what an editor, a colleague or a translation tool changed in an essay, a contract clause or a blog post.

Code and configuration

Compare two versions of a script, a JSON file or a config to find the one line that broke something.

Lists and data

Check what is new or missing between two exports, such as email lists, product names or keyword lists.

Lines, words, characters and views

Compare by Lines, Words or Characters

Lines

The best choice for code, lists and paragraphs. Lines that changed are paired and the changed words inside them are highlighted.

Words

Compares word by word across the whole text. Good for prose where a line break moved but the wording is the same.

Characters

Shows every added or removed character. Useful for catching a single typo, a changed digit or a stray symbol.

Side by side or inline

Side by side shows both versions next to each other. Inline merges them into one column with removals and additions in sequence.

Compare in a few steps

How to Use the Text Diff Checker

  1. Paste the original text on the left and the changed text on the right, or press Sample to try an example.
  2. Choose to compare by Lines, Words or Characters.
  3. Pick Side by side or Inline. Tick Ignore case or Ignore extra spaces if those differences do not matter.
  4. For long texts, tick Show only changes to hide unchanged lines and keep a few lines of context around each change.
  5. Press Copy diff or Download .diff to keep the result. Use Swap to compare the other way round.
Colours, symbols and similarity

How to Read the Differences

+ green added in the changed text − red removed from the original plain the same in both texts Similarity = 2 × unchanged ÷ (items in original + items in changed) Example: 8 lines and 9 lines with 6 unchanged Similarity = 2 × 6 ÷ 17 = 71%

The tool looks for the longest run of items that both texts share and marks everything else as a change. It uses Myers’ algorithm, the same approach that GNU diff and Git use by default, so it finds a shortest list of edits. The plus and minus signs and the labels read by screen readers mean the result does not depend on colour alone.

Copy diff gives you plain text. For lines, removed lines start with a minus sign and added lines with a plus sign. For words and characters, removed text is wrapped in [- -] and added text in {+ +}.

Better results

Simple Tips for Comparing Texts

  • Use Lines for code and lists, and Words for prose that was reflowed.
  • Tick Ignore extra spaces when the text was copied from different editors and the spacing differs.
  • If two lists look the same but are in a different order, sort both with the Text Sorter first, then compare.
  • Paste plain text. Formatting such as bold or colours is lost when you paste into a text box, so only the words are compared.
Good to know

Limitations and Privacy

Privacy

Both texts are compared in your browser. Neither one is sent to our server. Only your mode, view and option choices are remembered on your device, never the text itself.

Limitations

Each text can be up to 2 million characters, or 100,000 characters for character comparison. If two long texts are very different, the changed section may be shown as one replaced block. The tool compares plain text only, not Word or PDF files, and it does not understand code syntax.

Common questions

Text Diff Checker FAQ

How do I compare two texts online?

Paste the original text in the left box and the changed text in the right box. The differences appear below straight away, with added text in green and removed text in red.

What do the colours and symbols mean?

Green with a plus sign is added, red with a minus sign is removed, and plain text is the same in both. Inside a changed line, the exact words that changed get a stronger highlight.

What is the difference between comparing by lines, words and characters?

Lines compares whole lines, which suits code and lists. Words compares word by word, which suits prose. Characters compares every character, which helps you find a single typo or a changed digit.

How does the tool decide what changed?

It finds the longest sequence of lines, words or characters that both texts share and marks everything else as added or removed. It uses Myers’ algorithm, the same method GNU diff and Git use by default.

Can it ignore case or spacing differences?

Yes. Tick Ignore upper and lower case to treat capitals and lower case as equal, and Ignore extra spaces to ignore leading, trailing and repeated spaces. If nothing else differs, the tool says so.

What does Show only changes do?

It hides unchanged lines and keeps three lines of context around each change, with a note showing how many lines were hidden. It works when you compare by lines.

How is the similarity percentage calculated?

It is twice the number of unchanged items divided by the total number of items in both texts. Two identical texts score 100% and two texts with nothing in common score 0%.

Can I copy or download the result?

Yes. Copy diff and Download .diff give you plain text. For lines, removed lines start with a minus sign and added lines with a plus sign. For words and characters, removed text is in [- -] and added text in {+ +}.

Does it work for code, JSON and documents?

It works on any plain text, including code and JSON, but it does not understand syntax. You cannot upload Word or PDF files, and formatting is lost when you paste, so only the words are compared.

Is my text uploaded or stored anywhere?

No. Both texts are compared in your browser. Each can be up to 2 million characters, or 100,000 for character comparison. Your mode and option choices are remembered on your device, but the text is not saved.

From people using this tool

Reviews

Loading reviews…
Keep going

More tools in the box

The homepage features dozens more free tools that don't require an API key.

Suggest a tool