Private browser-based text diff

Compare Two Files Online

Compare two text or code files side by side, then review added, removed, and modified lines. Your files stay on your device: comparison happens entirely in this browser.

Files are read and compared in this browser only. Maximum: 1 MB and 1,500 lines per file.
Comparison options

File comparison workspace

Original file

Original File

No file selected · 0 lines

TXT, CSV, TSV, JSON, XML, HTML, CSS, JS, TS, Markdown, LOG, ENV, YAML, and other plain-text files.

Changed file

Changed File

No file selected · 0 lines

Paste text directly if you do not have local files to select.

How to compare two files online

Choose the original file and the changed file, or paste text into both panels. Select Compare files to see an added, removed, or modified line result. You can use side-by-side review on a wider screen, a unified diff on a phone, or a concise changes list when you only need the edits.

How to read added, removed, and modified lines

Added lines appear only in the changed file. Removed lines appear only in the original file. A modified entry pairs a removed line with its replacement and highlights the changed part of each line. Text labels and counts accompany the colors so the result remains usable without relying on color alone.

Supported text and code file types

The tool is for UTF-8 plain text: TXT, CSV, TSV, JSON, XML, HTML, CSS, JavaScript, TypeScript, Markdown, LOG, ENV, YAML, and YML. JSON and XML are treated as ordinary text here, which is useful when exact written lines matter.

Compare source code and configuration files

Use this tool to review edits in source code, a deployment configuration, a .env example, a Markdown revision, or a simple CSS change. It does not run uploaded code and renders file content as text only.

Compare CSV, log, and environment files

CSV exports can be compared as lines, including header and row changes. The same approach helps when reviewing log output or checking which environment variables changed between two safely redacted configuration files.

Text comparison versus semantic JSON or XML comparison

Use JSON Compare when object structure, array rules, and values matter more than formatting. Use XML Compare when namespaces, attributes, or element structure should be considered. This file tool is the simpler choice for a side-by-side line diff.

Privacy and local browser processing

Selected files are read directly by your browser for this session. Compare2Lists.online does not upload the file contents, place them in local storage, or send them to analytics. Reset clears the tool’s in-page text and file references.

Realistic limitations

This is a plain-text comparison utility, not a parser for PDFs, Word documents, spreadsheets, images, audio, video, or binary formats. Each input is limited to 1 MB and 1,500 lines to keep browser comparison responsive. Very large, generated, or binary files belong in a desktop development or document-specific tool.

Compare Two Files FAQ

Are my files uploaded?

No. Compare Two Files Online reads selected files directly in your browser. The file text is compared locally and is not uploaded, saved to an account, or sent to analytics.

Which file types can I compare?

You can compare plain-text formats such as TXT, CSV, TSV, JSON, XML, HTML, CSS, JavaScript, TypeScript, Markdown, LOG, ENV, YAML, and YML. Other text files may work when the browser can read them as plain text.

Can I compare PDF or Word files?

No. PDF, Word, spreadsheet, presentation, media, image, and other binary files are not supported by this text comparison tool.

Can I compare source code?

Yes. Paste or select text-based source files such as JavaScript, TypeScript, HTML, CSS, Markdown, configuration files, and logs.

What does ignore whitespace do?

It compares lines after whitespace characters are removed. Use it when spacing changes are not meaningful; use trim spaces when only leading and trailing spaces should be ignored.

Can I compare large files?

The tool accepts up to 1 MB and 1,500 lines per file. Large comparisons can still take a moment in a browser, so use a desktop diff tool for bigger or binary files.

Can I download the differences?

Yes. After comparing, copy a plain-text summary or download a unified .diff file containing the line changes.

When should I use JSON Compare or XML Compare instead?

Use this page for ordinary text differences. Use JSON Compare or XML Compare when you want those formats compared by structure instead of by their written lines.

Related comparison tools

Compare URLs

Inspect URL paths, parameters, and fragments without opening either URL.

Open tool

Compare Two Texts

Paste paragraphs, emails, or code snippets and review text revisions privately in your browser.

Open tool

Compare Two Lists

Compare list values and find entries that are unique, shared, or duplicated.

Open tool

JSON Compare

Compare JSON by structure when formatting differences should not count.

Open tool

XML Compare

Compare XML semantically when elements, attributes, and namespaces matter.

Open tool

Browse all comparison tools

Explore more browser-based tools for lists, files, and planning.

Open tool