Text Compare
Diff two blocks of text side by side, locally, with whitespace and case options.
Compare two texts line by line
This tool runs a line-oriented diff between two blocks of text you paste into the Original and Changed panels, aligning them side by side with added, removed and modified lines highlighted separately. It's built for comparing two versions of a config file, a paragraph you edited, or output from two runs of the same command, without uploading either side anywhere. For inputs over about 40,000 characters the diff runs in a background worker so the tab stays responsive.
How to use the Text Compare
- Paste the original text into the Original panel and the revised text into Changed.
- Turn on Ignore whitespace to treat lines that differ only by spacing as equal.
- Turn on Ignore case to match lines regardless of letter case.
- Turn on Trim lines to ignore leading and trailing whitespace on each line.
- Read the added, removed and changed counts, and scan the highlighted rows for differences.
The diff compares whole lines, split on \n, \r\n or \r, not individual words or characters, so a one-word change inside a long line still marks that entire line as modified. The ignore options only affect how lines are matched for comparison; the text shown in each row is always your original, unmodified input.
Frequently asked questions
- Does this diff tool compare word by word or line by line?
- Line by line. Each line from the Original panel is matched against lines in the Changed panel, so a single changed word inside a long line shows the whole line as modified rather than highlighting just that word.
- What does Ignore whitespace actually ignore?
- It strips all whitespace from each line before comparing, so lines that differ only in spaces or tabs, for example two JSON files with different indentation, are treated as equal even though the displayed text still shows the original spacing.
- Can I compare two large files without the page freezing?
- Yes, once the combined length of both inputs passes roughly 40,000 characters, the diff is computed in a Web Worker instead of the main thread, so typing and scrolling stay responsive while the comparison runs.
- Are the two texts I paste in uploaded anywhere?
- No, the diff algorithm runs entirely in your browser, either on the main thread or in a local Web Worker, so neither the Original nor the Changed text is sent to a server at any point.