How do you compare two files?
Drop the original file in zone A and the modified file in zone B, or use the "Choose a file" buttons. For two text files, the tool reads the encoding (UTF-8, UTF-16 or, failing that, Windows-1252), detects the line endings and shows the added, removed and modified lines, side by side or unified, with word-level or character-level detail. The patch in unified diff format can be copied or downloaded.
A binary file is compared byte by byte: sizes, number of different bytes, the list of different ranges with start, end and length in hexadecimal and decimal, then a hexadecimal view of both files with the differing bytes highlighted. The SHA-256 checksum of each file is also computed: two equal checksums prove the contents are identical.
What about two folders?
Drop a folder in each zone, or pick it with "Choose a folder". The tool lists the relative paths and tells you for each whether it is added, removed, modified or identical. Two files of different sizes are modified outright; at equal size, the SHA-256 checksums decide. The "Compare" button of a modified file opens its comparison under the table, and you can hide identical files. For two pasted texts, see Neogie Diff.
Limits
- Line-by-line comparison: 20 MB at most per file; beyond that, the tool compares bytes.
- Byte-by-byte comparison: 500 MB at most per file, read in chunks to spare memory.
- Folders: at most 50,000 files read per folder; only files count, not dates, permissions or empty folders.
- If dragging a folder does not work in your browser, "Choose a folder" does the same thing.
Frequently asked questions
Are my files sent anywhere?
No. Files are read and compared in your browser, by background workers; nothing is transmitted. Only display settings (case, spaces, view, hiding identical files) are kept in this browser, never the files or their names.
Why is a file treated as binary?
Because it contains null bytes (except UTF-16 with a byte order mark) or a high share of control characters. For two text files, a button also lets you compare byte by byte.
What does the line-ending warning mean?
Windows ends lines with CRLF, Unix and macOS with LF. The line comparison treats them as equivalent: a file converted from one to the other does not appear modified. The tool points it out, and the checksums show that the bytes differ.
How does a SHA-256 checksum prove two files are identical?
SHA-256 summarizes content in 64 hexadecimal characters. Different contents practically always give different checksums, so two equal checksums mean identical files.
Can the resulting patch be applied?
Yes. It is in unified diff format, with the line endings of file A, and applies with patch or git apply. It carries all the differences, even those the settings hide on screen.