Original (A)
Changed (B)
Differences
5 rowshost: api.example.com
host: api.example.com
retries: 2
retries: 3
timeout: 10
timeout: 30
debug: true
debug: true
region: us-east-1
region: eu-west-1
host: api.example.com
host: api.example.com
retries: 2
retries: 3
timeout: 10
timeout: 30
debug: true
debug: true
region: us-east-1
region: eu-west-1
Compare two text files or strings line by line and see exactly what changed. Paste the before and after text into the live tool — added and removed lines appear side by side or as a copy-ready unified diff, all locally.
The tool aligns both inputs line by line and reports every difference relative to the Original (A) side. Comparison rules:
host: api.example.com
retries: 2
timeout: 10
debug: truehost: api.example.com
-retries: 2
+retries: 3
-timeout: 10
+timeout: 30
debug: trueA config file changed between environments or branches. Paste both versions here to see the exact lines that added, removed or replaced settings.
Re-run a script or exporter and diff its output against the previous run to confirm only the intended content moved.
Aligned, line-level diffs make it easy to spot a new error group in a log export or the extra column in a data dump.
Whole file shows as one delete and one addWhy: Nearly every line differs — most often because one side was resaved with different indentation, line endings not yet normalized, or tabs vs spaces.
Fix: Normalize indentation first, then re-paste. Line endings (CRLF vs LF) are already normalized by the tool.
Changed lines appear out of orderWhy: The alignment favors the longest run of matching lines, so a large moved block can be reported as many small changes near the common lines instead of one move.
Fix: The line numbers on each side tell you exactly where each change came from.
Both inputs are JSONWhy: A line diff of JSON is noisy — a single field change can shift a whole pretty-printed block.
Fix: Use JSON Diff instead: it reports changed values by path and ignores formatting entirely.
Both texts are split into lines and aligned by a longest-common-subsequence algorithm. Lines that appear in only one side are reported as removed (only in A) or added (only in B); identical lines are shown as context.
Yes — it diffs any text, including JSON. The tool also detects when both sides are valid JSON and suggests the structural JSON Diff, which reports changes by path instead of by line.
No. Lines are compared exactly, including leading and trailing spaces. A line that gained a trailing space counts as a change — useful when a file was resaved with different indentation.
Windows CRLF and old Mac CR endings are normalized to LF before comparing, so two files with only different line endings finish as identical.
No. The entire diff runs locally in your browser. Nothing you paste ever leaves this page.
Yes. Copy Diff copies a unified, git-style view with @@ headers and +/- lines; Download saves that same view as a text file.
Last reviewed September 2026 · DataFormatter team — this tool processes data locally in your browser.