File Diff Online
Upload two text files or paste content to compare them side by side.
Original File
Click or drag & drop
Modified File
Click or drag & drop
When a file diff is the right tool
Sometimes the two versions you want to compare are already files on disk: an export a colleague emailed, a config you downloaded, or two copies of a script that never went into Git. A file diff is for that moment. You open the older file on the left and the newer file on the right, then read every added, removed, or replaced line instead of lining the two documents up by eye.
The files are read in your browser as UTF-8 text and then compared line by line. Nothing is uploaded to a server. This is not a binary comparison, and it is not a Git client. If the text is specifically JSON or XML, JSON Diff or XML Diff can normalize formatting first after you paste. If the files already live in a repository, git diff is usually the better tool.
Use cases
Comparing two exports you were sent
A pair of logs, CSV exports, or configuration files often arrives as attachments. Drop each file onto the matching zone, choose Compare, and read the highlighted lines. You do not have to create a throwaway folder or commit just to see the difference.
Checking a local copy against a downloaded original
You might have edited a script or a markdown file on disk and want to see how it differs from the copy you downloaded. Open both files here. After they are loaded, the text areas appear so you can still tweak a side before you compare again.
A quick look at source or config, not a binary
The comparison is built for text. JSON, YAML, XML, CSV, Markdown, SQL, and ordinary source files are a good fit. Images, PDFs, Word documents, and zip files are not: they will be decoded as text and look like noise. For a checksum instead of a line diff, use File Hash.
How the comparison works
Each drop zone accepts a click (which opens a file picker) or a drag-and-drop. The chosen file is read as UTF-8 text and kept under that side's name. Changing a file clears the previous result so you do not mix an old diff with a new file. Once at least one side has content, two text areas appear and you can edit or paste there as well.
When you choose Compare, the two texts are compared line by line, using the same style of alignment you see in a typical unified or split diff. Identical lines stay across from each other. A line that exists only on the left is marked as removed. A line that exists only on the right is marked as added. You can copy the unified result if you need a record. Compare stays disabled while both sides are still empty.
What this tool does not do
It does not upload files, detect an encoding other than UTF-8, or compare binary contents. It does not pretty-print JSON or XML before the diff, and it does not ignore whitespace. There is no sample button and no swap control; Clear removes both files and the result. Very large files can still be opened, but they may make the tab feel slow. For SQL or other structured text after you have the contents, the dedicated SQL Diff page may be a clearer place to read the change.
How to use File Diff
- Click or drop the older file onto the original zone, and the newer file onto the modified zone.
- Optionally edit or paste in the text areas that appear after a file is loaded.
- Choose Compare. Switch between split and unified views, and copy the result if you need to keep a record.
- Use Clear when you are finished, which also removes the loaded file names.
If you would rather paste two snippets without opening a file, the homepage text diff or Code Diff start from the keyboard.
Frequently asked questions
Are the files uploaded to a server?
No. Each file is read in your browser with the FileReader API and kept in memory on this device. Nothing is sent to a DiffCheck server. Closing the tab discards the contents. Do not open files that contain secrets if you would not be comfortable with them sitting in memory here.
Can I paste text instead of opening a file?
Yes, but only after at least one side has been loaded. The drop zones are the starting point; once a file has been read (or even if only one side has content), two text areas appear and you can edit or paste there. There is no paste-only starting view when both sides are still empty.
Which file types are supported?
The tool compares whatever it can read as UTF-8 text. The file picker suggests common text types such as .json, .yaml, .xml, .csv, .md, .sql, and ordinary source files, but that list is a hint, not a hard filter. You can also drop a file of another type. Binary files (images, PDFs, office documents, zip archives) will look like garbled text and are the wrong tool here.
What encoding is used when a file is opened?
Files are read as UTF-8 text. There is no encoding picker. A file saved as Windows-1252, UTF-16, or another encoding may show replacement characters or mojibake, and those lines will then look like changes even when the logical content is the same.
Is there a file size limit?
There is no server-imposed limit, because nothing is uploaded. A few thousand lines is comfortable. Multi-megabyte files can make the tab feel slow or hit a browser memory limit; in that case, compare a smaller excerpt or use a local tool.
How is this different from Code Diff or the homepage text diff?
The comparison itself is the same style of line diff, with split and unified views. This page is the one that can open files from disk. Code Diff and the homepage tool start from paste. If the files are specifically JSON, XML, or SQL, those dedicated pages can add a format step or more specific guidance after you paste the text.
Can I compare two binary files or get a checksum?
Not on this page. For a checksum of a file, use File Hash, which reads the file in the browser and computes hashes without uploading it. A binary comparison of images or archives belongs in a local tool.
Related tools and guides
References
- The FileReader API is what reads each file in the browser. This page calls
readAsText, which decodes the file as UTF-8. - If the files already live in Git, a local
git difforgit diff --no-indexkeeps the comparison with your usual tools. A browser diff is still useful when you were emailed two exports and do not want to make a repository for them. - For a structured comparison, open the text on the dedicated JSON, XML, CSV, or SQL pages after you have the contents, rather than relying on a raw line diff of a formatted dump.