JSON COMPARE

Compare Text Online

Compare two blocks of text, logs, or files line by line and instantly see what changed — with word-level highlighting inside each modified line, not just a whole-line red and green wall.

Original document

0 lines

Document to compare against

0 lines

More about comparing text

Features, how it works, and frequently asked questions.

+

Built for reading differences, not just spotting them

Word-level precision

A modified line doesn't just get flagged as 'changed.' The exact words that differ are underlined inline, so a one-word edit in a long line is obvious at a glance.

Case and whitespace, your call

Turn off case-sensitivity to ignore capitalization differences, or ignore whitespace to stop trailing spaces and re-indented lines from counting as changes.

Side-by-side or unified

Switch between a side-by-side view for scanning structure, and a unified view that reads like a patch — useful whether you're reviewing logs or prose.

Works on anything text-shaped

Logs, Markdown, YAML, config files, source code, or plain prose — if it doesn't need a parser to be useful, this is the right tool for it.

How the comparison works

1

Add both versions

Paste text directly, drag a file onto either panel, or click Upload file. Nothing leaves your browser at this stage.

2

Decide what should count

Choose whether the comparison should be case-sensitive and whether incidental whitespace differences should be ignored, then run it.

3

Read the result

A summary line totals additions, removals and modified lines. Each modified line also shows exactly which words inside it changed.

Other comparison tools

Need to compare structured data instead? JSON Compare understands objects and arrays, so key order and formatting never cause a false difference.

Learn more about comparing text

What a text comparison actually checks+

Unlike a structural comparison, a text diff doesn't try to understand what the content means — it walks both documents line by line and reports which lines are only on one side, and which lines exist on both sides but differ.

That's exactly the right model for content that doesn't have a required structure: log output, Markdown documents, prose, source code, or configuration in a format the tool doesn't specifically parse. There's no schema to violate, just lines that match or don't.

Word-level highlighting inside changed lines+

A whole-line diff is often too coarse. If one word changes in an 80-character log line, marking the entire line as removed and re-added tells you something changed but not what.

When a removed line and an added line are adjacent and represent the same edit, they're paired into a single modified row, and a word-level comparison marks exactly which words differ — so a one-word fix reads as a one-word fix, not a wall of red and green.

Ignoring case and whitespace when it doesn't matter+

Not every difference is meaningful. Re-indenting a file, converting tabs to spaces, or a script that happens to change capitalization can bury the changes you actually care about under noise.

The Ignore whitespace option trims each line and collapses repeated whitespace before comparing, and Case-sensitive can be turned off to treat 'Error' and 'error' as the same line — both without modifying the text you pasted or uploaded.

Comparing logs, Markdown, and config files+

Application logs, Markdown documentation, and config files in formats like YAML or .env share one property: they're read top to bottom, and a difference usually matters because of where it sits relative to the lines around it.

A line-based diff preserves that context directly — added and removed lines are shown right next to the unchanged lines around them, rather than collapsed into a change count with no location.

Privacy: where your text actually goes+

Both panels are read and compared entirely inside your browser using JavaScript running on your own device. The content is never sent to a server, logged, or stored anywhere — closing the tab clears it completely.

That matters for text in particular, since logs and config files often contain hostnames, internal URLs, or tokens that shouldn't leave your machine just to be diffed. See the privacy page for the full explanation of what does and doesn't happen to your data.

Frequently asked questions

What's the difference between this and the JSON comparison tool?+

JSON Compare parses both documents and reports changes by property path, so key order and formatting never affect the result. Text Compare skips parsing entirely and compares line by line, which is what you want for logs, Markdown, config files, or anything that isn't valid JSON.

Can I ignore whitespace-only differences?+

Yes. Turning on Ignore whitespace trims leading and trailing spaces from every line and collapses runs of internal whitespace before comparing, so re-indented or reformatted lines with identical content aren't reported as changed.

Does it show word-level changes within a line, or just whole-line differences?+

Both. A line that was edited rather than fully replaced is shown as a single modified row, with the specific words that changed underlined on both sides — so you can see a one-word edit in a long line without reading the whole thing twice.

Can I compare log files, Markdown, or source code?+

Yes. The comparison works line by line regardless of what's in the file, so it's equally at home with application logs, Markdown documents, YAML or config files, and source code snippets.

Is my text uploaded anywhere?+

No. Both panels are compared entirely inside your browser using JavaScript running on your own device — nothing is sent to a server, logged, or stored. That matters here in particular, since text and logs often contain hostnames, tokens, or other details you wouldn't want leaving your machine.