Compare text
See what changed, side by side.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Compare two texts line by line with bounded longest-common-subsequence matching. Whitespace comparison is optional; downloadable originals never include visual diff markers.
How to use this tool
- Paste the original into “Original text” or select a local text file, then paste the changed version into “Revised text”.
- Choose whether to ignore whitespace differences in Settings, then select “Compare texts”.
- Read the aligned line numbers and changes. Download either original text from the result area if needed.
Supported inputs and limits
Up to 1 MiB per text and 4,000 lines each, with at most four million comparison cells. Large comparisons fail explicitly instead of exhausting the browser.
Worked example
Example input
a b a c
Example options
{}Example output
{
"diff": [
{
"type": "same",
"left": "a",
"right": "a",
"leftLine": 1,
"rightLine": 1
},
{
"type": "delete",
"left": "b",
"right": "",
"leftLine": 2,
"rightLine": null
},
{
"type": "insert",
"left": "",
"right": "c",
"leftLine": null,
"rightLine": 2
}
]
}When something does not work
Correct the reported syntax or range and run again. Formatting is not execution: scripts, SQL, expressions and pasted markup do not run against your system or a remote service.
Frequently asked questions
Are my files uploaded?
No. Files and tool input are processed in your browser. Moving around the site can keep a temporary workspace in the same tab. Refreshing or closing the tab clears it, so download results you want to keep.
What should I check in this result?
Compare two texts line by line with bounded longest-common-subsequence matching. Whitespace comparison is optional; downloadable originals never include visual diff markers.
Documentation & further reading
Related tools
JSON formatting workspace
Format or minify strict JSON, sort object keys, and encode or decode strings while preserving raw number tokens.
Regex tester
Try a pattern and see what it matches in your text.
HTML formatter
Format HTML indentation so its structure is easier to read.
CSS formatter
Tidy the indentation and line breaks in your CSS.