Text Compare Online

Compare prose, source code, JSON, XML, SQL, and other text online. Auto-detect and format supported code or data files locally, then find added, removed, and edited lines with word- or character-level detail.

100% Client-Side: Your data is processed locally and never leaves your browser.

Original Text

Drop a text file here or paste text · 1 lines0 bytes · 0 characters

Modified Text

Drop a text file here or paste text · 1 lines0 bytes · 0 characters
Comparison options

Windows and Unix line endings are normalized for comparison. Trimming affects only line edges. “Ignore whitespace differences” removes all whitespace for comparison, including whitespace inside strings and code. Changing language affects highlighting only.

How to use this tool

  1. Paste or type the original and modified versions, then choose Auto-detect or select a format above either input and press Auto format or Format.
  2. The formatter supports Bash, C/C++, C#, CSS, HTML, Java, JavaScript, JSON, Markdown, Python, SQL, TypeScript, XML/SVG, and YAML.
  3. Plain prose remains unchanged.
  4. Then select Compare to find differences.
  5. Formatters run locally in a separate browser worker; large language formatters may take longer to load the first time.

Processing happens in your browser; entered values are not sent to a service.

Technical logic and examples

The tool compares the two text inputs line by line and reports added, removed, and unchanged lines. Optional formatters run locally before the comparison; formatting is not applied unless you choose it.

Worked examples

  1. Original: “color: blue;” and revised: “color: navy;” produces one removed line and one added line.
  2. Comparing identical JSON text reports no differences; formatting both inputs first can make whitespace-only changes easier to review.

Frequently asked questions

What kinds of text can I compare?

The comparison is language-independent and works with prose, source code, JSON, XML, SQL, logs, configuration files, and other plain text. Syntax highlighting is optional and does not change the comparison.

Can I format text before comparing?

Yes. Auto-detect uses a file extension when available and otherwise looks for recognizable JSON, markup, SQL, or source-code syntax. You can also select Bash, C/C++, C#, CSS, HTML, Java, JavaScript, JSON, Markdown, Python, SQL, TypeScript, XML/SVG, or YAML explicitly. Invalid code is not replaced with formatted output.

Does auto-format work for plain text?

Plain prose and logs have no standard formatter, so they are not changed by auto-detection. Choose a format explicitly for ambiguous source code; the selected parser reports syntax errors instead of guessing silently.

Are my text and files uploaded?

No. Comparison and formatting run in browser workers. Local files are read in your browser and are not sent to a service. Some language formatters download their code or WebAssembly module on first use.