Compare two text files online
No install, no upload, no account. Open both files, copy the contents of each into the boxes below, and see exactly which lines were added, removed or left unchanged between them.
How to compare two files with this tool
- Open the first file in any text editor, code editor, or even a plain viewer — select all its contents (usually Ctrl/Cmd + A) and copy it.
- Paste it into the Original file contents box above.
- Repeat for the second file into the Changed file contents box.
- The diff appears automatically. Turn on ignore blank lines if the two files were reformatted with different line spacing, or ignore leading/trailing whitespace if one file was re-indented.
- Switch to side by side if you would rather read the two files lined up in columns than as one interleaved list.
Nothing here reads the file from disk directly — the browser security model does not let a plain web page do that without an explicit file picker, and this tool intentionally does not add one. Copy-and-paste means the exact bytes you select are what gets compared, with no intermediate upload step to go wrong.
When this beats opening both files side by side yourself
- Files longer than a screen. Eyeballing two multi-page documents for differences is exactly the kind of task humans are bad at and computers are good at.
- Whitespace-only edits. A file that was only re-indented or re-wrapped looks completely different at a glance but is functionally identical — the ignore-whitespace and ignore-blank-lines options confirm that in one click.
- Confirming an export or a save round-trip. If a tool re-saves a file and you want to be sure nothing besides formatting changed, paste the before and after and check the added/removed count is zero once whitespace is ignored.
- You do not have both files on the same machine. If one version is in an email, a chat message, or a browser tab, and the other is a local file, pasting both into two boxes is often faster than getting them onto one machine to diff locally.
Frequently asked questions
How do I compare two text files without uploading them anywhere?
Open each file in any text editor, select all its contents, copy it, and paste it into the Original or Changed box above. The comparison runs in your browser the moment you paste or type — the file contents are never sent anywhere, because there is no upload step at all.
Can I drag and drop a file instead of pasting it?
Not currently — the boxes accept typed or pasted text only. For most text files, opening the file and copying its contents takes only a few seconds longer than a drag-and-drop would, with the advantage that nothing about the file (its name, its path, its size) is ever read by the page.
Does it matter what kind of text file it is?
No — source code, configuration files, CSV, log files, Markdown, and plain prose are all treated the same way: as lines of text. The tool does not parse or validate any particular format, so it works identically regardless of the file extension.
What if the two files are very large?
Ordinary files — anything up to a few thousand lines per side — compare instantly. Beyond that the comparison is capped so the page never hangs: it compares as much as it safely can and states exactly how many trailing lines were left out of each side. For a genuinely huge file, compare it in sections.
Will this catch a difference in line endings between two files?
Line endings themselves (\n vs \r\n) are not shown as a difference — both are treated as an ordinary line break, and only the text content of each line is compared. A single trailing newline at the very end of the file is likewise not treated as a difference, matching how most editors save files.