Compare Text Online — Free Diff Checker
Paste or upload two files to see line-by-line and word-level differences instantly. Supports code, JSON, YAML, and plain text, with syntax highlighting.
Give Rating
Compare two texts and find every difference
TextCompare is a free online diff checker and text comparison tool. Paste the original text on the left and the changed version on the right, and every added, removed and edited line is highlighted, down to the characters that changed inside each line.
The comparison runs in your browser, so the text you paste is not sent to a server. There is nothing to install, no account to create and no limit on how often you compare.
How to compare two texts online
Add the original text
Paste it into the left editor, drop a file onto it, or load one from a URL, Google Drive or OneDrive. Plain text, code files and Word (.docx) documents all work.
Add the changed version
Do the same on the right. If you put them the wrong way round, Swap moves each text to the other side.
Click Compare
Removed text is highlighted in red on the left and added text in green on the right, with the exact characters that changed marked inside each line.
Review, share or export
Step through the changes with Previous and Next or the Changes panel, comment on any line, then download a PDF report or a .txt diff, or save the comparison online and share the link.
Everything in the text compare tool
Compare text side by side
Read both versions next to each other, or switch to Inline to see the changes in a single column, which also suits narrow screens.
Character-level highlighting
Inside every changed line the exact characters that differ are marked, so one changed digit, comma or space is easy to spot.
Hide unchanged regions
Collapse the lines that match, so a long file shows only the parts that changed and a little context around them.
Syntax highlighting for 35+ languages
Pick JavaScript, TypeScript, Python, Java, C#, Go, SQL, JSON, XML, YAML, Markdown and more, and the code is coloured the way your editor shows it.
Format before you compare
Format re-indents minified or messy JavaScript, TypeScript, HTML, JSON and XML on both sides, so only real changes are left highlighted.
Value view for JSON, XML and YAML
Compare the parsed data instead of the lines: changed values are shown old and new, and indentation and line breaks no longer count as changes.
List view
Treat every line as an item and see what is only in the first text, only in the second, and in both, in any order.
Comments on any line
Leave a note on a change to explain or question it. Comments are kept with the comparison when you save or share it.
History in your browser
Recent comparisons are kept on your device, so you can reopen one later without pasting both texts again.
PDF and text export
Download the comparison as a PDF report to send or print, as a unified .txt diff, or just the modified text.
What people compare with TextCompare
Writers and editors
Check two drafts of an article, essay, contract or policy and see every reworded sentence without rereading both versions.
Developers
Compare two versions of a function, a config file or a log when git is not to hand, with syntax highlighting and Format.
Students and teachers
See what changed between a draft and its revision, or between the version that was handed in and the one that was marked.
Data and operations
Diff two exports, lists of IDs or API responses to find the lines that were added, dropped or edited.
Getting a cleaner comparison
Every line shows as changed
The two sides are usually formatted differently. For code and data, click Format to indent both the same way; for prose, check that one side is not wrapped at a fixed width.
Minified code is one long line
Format spreads JSON, XML, HTML and JavaScript over separate lines, so each change lines up with the part of the code it belongs to.
A long file with only a few changes
Turn on Hide unchanged regions and jump between changes with Previous and Next, or pick one from the Changes panel.
Lines that moved count as changed
A line diff reports a moved block as removed in one place and added in another. If the order does not matter, the List view matches lines wherever they are.
Spaces you cannot see
Trim whitespace is on by default and ignores spaces at the start and end of lines. Turn it off in the options to catch trailing spaces and indentation changes too.
Frequently asked questions about comparing text
Is my data stored?
No, comparisons run entirely in your browser.
Is TextCompare free?
Yes. This difference checker is free, with no account and no limit on the number of comparisons.
How do I compare two files for differences?
Drop one file on each side, or paste their contents, then click Compare. Text, code and Word (.docx) files open here; PDFs, spreadsheets and images have their own tools.
Can I compare code?
Yes, with syntax highlighting for 35+ languages.
Can I compare two Word documents?
Yes. Drop two .docx files in to compare their text here, or use the PDF & Word tool to see the changes on the real page layout.
Can I ignore whitespace?
Yes. Trim whitespace, on by default, ignores spaces and tabs at the start and end of each line. Turn it off to see those changes too.
Can I share a comparison?
Yes. Save it online to get a link that opens the same comparison, comments included, for anyone you send it to.
Do I need to install anything?
No — it runs in your browser, so you can compare text files online without downloading software.
Is there a desktop app?
Yes. The desktop app for Windows, macOS and Linux has the same comparison tools and works offline.