File Compare

Drag & drop a file hereor click anywhere to browse
Drag & drop a file hereor click anywhere to browse
Original fileChanged file

How to use File Compare

File Compare shows the differences between two text-based files side by side, line by line. The files are read in your browser and are never uploaded to a server.

Step by step

  1. Add the original file on the left: drag and drop it onto the box, or click the box to browse for it.
  2. Add the changed file on the right in the same way. Click a box again to replace its file.
  3. Click Compare. The Comparison result appears below with the original on the left and the changed file on the right, each with line numbers.
  4. Read the highlights: red marks lines that were removed, green marks lines that were added, and within a modified line the exact words that differ are highlighted.
  5. Check the summary to see how many lines were modified, added and deleted. If the files match, the tool tells you they are identical. Click Clear to start over.

Tips

  • Only text-based files work, such as .txt, .csv, .json, .xml, .yaml, .md, .log, source code and configuration files. Images, PDF or Office documents, archives and other binary files are rejected with a message.
  • Each file can be up to 10 MB, and you can drop only one file at a time into each box.
  • To compare text you have copied rather than files, use the Text Compare tool.

Good to know

Comparing files works like comparing text: the contents are read as text and aligned line by line. It is useful for any plain text format, including source code, JSON, CSV, XML, logs and configuration files.

Because files are read in your browser, you can compare private documents without uploading them anywhere.

When to use it

  • Comparing a deployed configuration file with the one in your repository.
  • Checking two exports (for example CSV files) for rows that were added or changed.
  • Reviewing the difference between two versions of a script.

Common mistakes

  • Comparing binary files such as images or PDFs. They are not meaningful as text. Use a tool made for that file type.
  • Differences in file encoding (for example UTF-8 versus an older encoding) can make accented characters look changed.
  • Very large files can be slow in a browser. Compare only the relevant section when possible.

Frequently asked questions

Are my files uploaded?
No. The files are read in your browser and never sent to a server.
Which files can I compare?
Text-based files such as .txt, .csv, .json, .xml, .yaml, .md, .log, source code and configuration files. Images, PDF or Office documents, archives and executable files are rejected with a message.
How large can a file be?
Up to 10 MB per file, and one file at a time in each box.
Why does it say my file looks like a binary file?
The content is checked after the file is read. Text that contains NUL bytes or many characters that cannot be decoded is treated as binary, which also catches an image that was renamed to .txt.
Which text encoding is used?
The browser reads the file as text, normally UTF-8. A file saved in another encoding may show unexpected characters, so save it as UTF-8 first.
What do the colours mean?
Red marks lines removed from the original and green marks lines added in the changed file. Inside a modified line, the words that differ are highlighted. If the files match, the tool says they are identical.

Related searches: compare two text files online side by side · compare json files online · compare csv files online · compare xml files online

Tìm kiếm liên quan: công cụ so sánh hai file văn bản online · tìm điểm khác biệt giữa hai file · so sánh file json csv xml · so sánh file cấu hình