Text Compare Checker

Compare two text files

Drop two files onto the panes below, or use the upload buttons. Your files are read locally by the browser — nothing is transmitted.

Text comparison tool

0 lines
0 lines

Paste text into both panes, then press Compare.

Comparing files without uploading them

When you select a file here, the browser's FileReader interface reads it from your own disk and hands the text straight to the comparison code running on the page. There is no intermediate server, which means there is no upload to wait for, no size limit imposed by a hosting plan, and no copy of your file sitting in someone else's logs.

The practical consequence is that this works for files you would not be comfortable pasting into a web form — draft agreements, exported customer data, internal configuration, unreleased documentation. The 5 MB cap on uploads exists purely to keep your own browser responsive, not because of a server constraint.

Which file types work

Anything that is genuinely plain text: .txt, .md, .log, .csv, .tsv, .json, .xml, .html, .yml, .ini, and source files such as .js, .ts, .py, .java, .go, .rs and .sql.

Binary formats are rejected deliberately. A .docx, .pdf or .png file is compressed and structured, so comparing the raw bytes produces meaningless output. For Word documents, open each one, copy the text and paste it into the panes instead.

Choosing a granularity for files

For source code and configuration, line comparison is almost always the right choice — it matches how the file is structured and how you think about changes. For log files, line comparison also works well because each entry occupies its own line.

For files containing prose — documentation, README files, exported articles — switch to word granularity. A single reworded sentence would otherwise show as an entirely changed line, which tells you far less than seeing the three words that actually moved.

Dealing with formatting noise

Two files that are functionally identical can differ in indentation, trailing spaces or line endings. A file saved on Windows uses CRLF line endings while the same file saved on macOS or Linux uses LF — this tool normalises that automatically, so you will never see an entire file reported as changed for that reason alone.

For the rest, tick Ignore whitespace to collapse runs of spaces and tabs and trim each line before comparing. If one file has been reformatted by a code formatter, this single option is usually the difference between an unreadable wall of red and a clear view of the two real changes.

Comparing files — common questions

Is my text uploaded to a server?

No. The entire comparison runs in your browser using JavaScript. Your text is never transmitted, logged or stored anywhere. You can verify this yourself: open your browser developer tools, switch to the Network tab, and run a comparison — no request carrying your text will appear. The only network activity is the page itself and, if enabled, analytics and advertising scripts, none of which receive what you typed.

How do I compare two text files online?

To compare 2 text files, click the upload button above either pane and choose a file, or drag a file directly onto a pane. Load the original on the left and the changed version on the right, then press Compare. Supported formats include .txt, .md, .csv, .json, .xml, .html, .log and common source code files. The file is read locally by your browser using the FileReader API — it is never sent anywhere, so you can compare two text files without installing software or uploading anything.

What is a diff tool?

A diff tool compares two versions of text and shows exactly what changed between them. The name comes from the Unix "diff" command. Developers use them to review code changes, writers use them to compare drafts, and lawyers use them to check contract revisions. The output marks each line or character as unchanged, added or removed.

Is there a limit on how much text I can compare?

There is no artificial limit. Uploaded files are capped at 5 MB to keep the browser responsive, but pasted text has no cap. Very large inputs — tens of thousands of lines — will take a moment to process because the work happens on your own device rather than on a server.

Can I download the comparison result?

Yes. Use the Download button to save the result as a plain text file in unified diff format, with minus and plus prefixes marking removed and added lines. You can also copy the result to your clipboard.