Skip to content
Free tool

Compare text online – Diff Checker

Compare text online: paste two texts, configs or versions of code and see the differences line by line, word by word or character by character, along with a percentage similarity score—for example, 50 % for two server configs with 3 of 6 lines in common. Free, with no sign-up or upload: the comparison runs entirely in your browser.

Built by Dimitri Heissler

Compared configs? Get your own Minecraft server.

Your texts stay in your browser: they are neither uploaded nor saved.

Differences

Change blocks

0

Added
+0
Removed
−0
Unchanged
0
Similarity
100 %

Counted in lines.

Paste the original text on the left and the changed version on the right, or load the example. The differences appear instantly.

Example result

What this Diff Checker shows you

Paste the old text on the left and the new text on the right to instantly see which lines or words were added, removed, or changed—with line numbers, change counts, and a similarity percentage. You can copy a Unified Diff of the comparison. Two examples:

Example 1: Compare two config versions line by line

Original text:

hostname "Survival Server"
maxplayers 32
password ""
tickrate 64
rcon_password "change_me"
motd "Welcome!"

Changed text:

hostname "Survival Server EU"
maxplayers 48
password ""
tickrate 64
motd "Welcome!"
region eu
Result of the line-by-line comparison
OriginalChangedStatusContent
11Changedhostname "Survival Server"hostname "Survival Server EU"
22Changedmaxplayers 32maxplayers 48
33unchangedpassword ""
44unchangedtickrate 64
5–removedrcon_password "change_me"
65unchangedmotd "Welcome!"
–6addedregion eu

In words: 3 lines added, 3 lines removed, 3 lines unchanged, across 3 change blocks. Similarity is 50%.

Copied as a unified diff, as produced by diff -u and git diff:

--- original
+++ modified
@@ -1,6 +1,6 @@
-hostname "Survival Server"
-maxplayers 32
+hostname "Survival Server EU"
+maxplayers 48
 password ""
 tickrate 64
-rcon_password "change_me"
 motd "Welcome!"
+region eu

Example 2: Compare text word by word

Original text:

The server restarts every Friday at 18:00. Please save your progress beforehand.

Changed text:

The server restarts every Friday at 19:30. Please save your progress beforehand.

Word-by-word comparison (deletions struck through, additions underlined):

The server restarts every Friday at 1819:0030. Please save your progress beforehand.

In words: „18“ and „00“ were removed and „19“ and „30“ were added. 14 words and punctuation marks are unchanged; similarity is 87.5%.

How it works

How to find differences between two texts

Four steps from pasting to a unified diff—no account, no download.

Step 1

Paste both texts or open files

Paste the original text on the left and the changed version on the right, or open a text file of up to 2 MB for each. Click “Load example” to see what the result looks like.

Step 2

Choose comparison type and options

Compare by line, word or character. Turn on “Ignore case” or “Ignore whitespace and indentation” as needed, and “Ignore blank lines” in “Lines” mode.

Step 3

Read differences

Removed sections are red and added sections are green. You can switch between side-by-side and stacked views. In “Lines” mode, both sides' line numbers appear alongside the text, and “Next” and “Previous” take you from one change to another.

Step 4

Reuse result

Check the counts of added, removed and unchanged sections, along with the similarity score. In “Lines” mode, use “Show changes only” to hide unchanged sections and copy the unified diff for tickets or code reviews. Use “Swap texts” to reverse the comparison.

Applications

What you can compare with the text comparison tool

The Diff Checker compares text. You can use it to compare anything you can copy text from or save as a text file. The table shows the right approach and the best mode.

What you can compare and how
SourceHow it worksRecommended mode
Two texts, emails, contractsPaste the two texts on the left and rightWords
Text files and configs (.txt, .cfg, .ini, .json, .yml, .xml)Use “Open file” to load one file of up to 2 MB at a time, or paste the contentsLines
Code and logsPaste and enable the ignore options if the differences are only formattingLines
Word documentsCopy and paste text from the document; formatting and tracked changes are not comparedWords
PDF filesCopy and paste text from the PDF; scanned PDFs without a text layer are not supportedWords
Excel spreadsheetsSave both tables as CSV and load them using “Open file”Lines

Comparison rules

How the Diff Checker compares texts

Diff tools differ in small ways. Here's how this tool compares content so you can interpret the results correctly.

Lines
Standard mode compares line by line, like diff and git. Lines match if they are identical character for character. If two lines differ by only a few words, the tool also highlights those words within the line.
Words and characters
For prose, contracts, or translations, compare by word: each word, number, or punctuation mark is one unit. In character mode, each visible character counts separately, which is useful for typos and version numbers.
Options
Ignore case, ignore whitespace and indentation (leading and trailing spaces, and multiple spaces treated as one), and, in Lines mode, ignore blank lines. These options help prevent formatting-only changes from cluttering the results, especially with configs and code.
Line breaks
Windows (CRLF), Unix (LF), and old Mac (CR) line breaks are treated as equivalent. A line break at the end of the text does not create an extra empty line. If the two texts use different line breaks, the tool points this out.
Similarity
Similarity is 2 × unchanged blocks divided by the sum of the blocks in both texts, expressed as a percentage. It is rounded down to one decimal place so only truly identical texts show 100%.
Unified Diff
The copied Unified Diff contains a header @@ -a,b +c,d @@ for each change block, three lines of context, and removed lines prefixed with a minus sign and added lines prefixed with a plus sign. If ignore options are enabled, it represents the lines as displayed.

Discover more

More tools

Server Configuration Generator

Describe your server.properties in your own words using the ZapX AI Agent or set each option manually — with a live preview to copy or download.

Built by Florian Galz

JSON Formatter

Format, minify, and validate JSON with syntax highlighting, error messages, and downloads, entirely in your browser.

Built by Jakub Martyniak

YAML Validator

Check YAML syntax and format it consistently or convert it directly to JSON. Supports multiple documents separated by `---` (e.g., Kubernetes manifests), with precise line and column error messages. Runs entirely in your browser.

Built by Jakub Martyniak

XML Formatter & Validator

Validate, format, minify, and automatically repair XML (unescaped characters, missing tags, missing declaration)—100% in your browser, without uploading.

Built by Justin Schuessler

Regex Tester

Test regular expressions live against the native JavaScript engine—with match highlighting, capture groups, and replace mode, all in your browser.

Built by Jakub Martyniak

Compare images (before/after)

New

Compare two images: use a before-and-after slider, view them side by side with synchronized zoom, blend them, or see a difference image that highlights changed pixels and counts them as a percentage. The images stay in your browser.

Built by Justin Schuessler

Character Counter & Word Count (Word Counter)

Character and word counter: count words and characters online, calculate reading time, and check limits for X, SMS, meta tags, and Discord. Runs entirely in your browser.

Built by Dimitri Heissler

Case Converter (capitalization)

Online Case Converter: Convert text to uppercase, lowercase, Title Case, sentence case, camelCase, or snake_case, with an undo function. Runs entirely in your browser.

Built by Rugile Rutkauskaite

FAQ

Frequently asked questions

Quick answers about comparing text: files, Word, PDF and Excel, lists, similarity and privacy.

Paste both texts into the two fields to compare them live. For prose, select “Words”: You’ll see that between “The server restarts at 18:00” and “The server restarts at 19:30”, only “18:00” changes to “19:30”. For files and configs, select “Lines”. Removed text is marked in red, added text in green.

Paste the old text on the left and the new text on the right. The tool uses the Myers algorithm, also used by git, to find the longest common sequence and marks everything else as removed or added. This is a deterministic algorithm, not AI: the same texts always produce the same result, and no text is sent to an AI service. You don't need to sign up, and nothing is uploaded.

Click “Open file” on each side and select a text file of up to 2 MB for each, such as .txt, .cfg, .ini, .json, .yml, .xml, .csv or .log. Pasted text can be larger: from 100,000 characters in total, the tool waits for a brief pause in typing, and the view initially shows 1,500 lines. You can load more with a click. The tool always compares exactly two texts; it can't compare entire folders.

Not directly. The tool reads files as plain text and can't process .docx, .pdf or .xlsx files. For Word and PDF, copy the text, paste it on the left and right, and compare by “Words” because line breaks often change when copied. Save Excel spreadsheets as CSV, open them with “Open file” and compare by “Lines”. The tool doesn't compare formatting, images, formulas, Word's tracked changes or scanned PDFs without a text layer.

Lines work well for code, configs, logs, and lists: a changed line is marked as a whole, with changed words inside it highlighted too. Words work well for prose, contracts, and translations because line breaks don't matter. Use characters for typos, version numbers, and hashes: comparing “kitten” and “sitting” shows 2 removed and 3 added characters.

Yes, in “Lines” mode: put one entry per line, with one list on the left and the other on the right. “Ignore blank lines” and “Ignore case” hide formatting-only differences. The comparison follows the original order and doesn't sort the lists: an entry in a different position may appear as removed and then added elsewhere. Sort both lists the same way first.

Usually, invisible differences are behind it: trailing spaces, tabs instead of spaces, non-breaking spaces, letter case, or an “é” made up of two Unicode characters. The “Ignore whitespace and indentation” and “Ignore case” options filter out the whitespace and case differences. Different line endings (Windows CRLF versus Unix LF), however, never count as a difference.

Similarity is 2 × unchanged blocks ÷ (blocks in the original + blocks in the new version). In the example above, 3 out of 6 lines in each text are unchanged: 2 × 3 ÷ 12 = 50%. Two identical texts score 100%; two completely different texts score 0%. The value is rounded down so only identical texts show 100%.

No. The comparison runs entirely in your browser, with no upload, logging, or storage. Opened files are read only locally. You can check this in the developer tools' Network tab: typing generates no requests. This makes the tool suitable for configs containing internal values, too.

Any more questions?

Contact Support
Done with your text?

Host your own Game Server in 60 seconds

Whether it's Minecraft, Rust, or FiveM, your server runs with DDoS protection, easy Mod management, and enough power for your community.

4.4/5 Trustpilot32,000+ Active serversSince 2010

No setup. No risk. Online in seconds.

Flexible TermCancel anytimeOnline in 60 seconds

Looking for more tools? View all developer tools