Side-by-Side Diff (HTML)

Paste two versions to get a side-by-side comparison with line numbers, coloured added and removed lines and inline word highlights for changed lines.

Use the tool

Why this tool exists

A unified diff is compact but harder to read than two columns, especially for code and configuration where one line changed slightly. Seeing the old and new line next to each other with the exact words marked makes review faster.

This viewer aligns the two texts line by line, numbering each side. Removed lines are tinted on the left, added lines on the right, and where a line was changed rather than replaced, the specific words that differ are highlighted. You can ignore whitespace or case to avoid noise from indentation and capitalisation. The comparison is plain text with no syntax awareness. It is drawn in your browser, so source code and drafts are not uploaded anywhere.

How to use it

  1. Paste the original into the first box and the changed version into the second.
  2. Tick ignore whitespace or ignore case if needed.
  3. Run the tool to render the two-column comparison.
  4. Scroll through the highlighted lines to review each change.

Frequently asked questions

How does it differ from the text diff tool?

The text diff gives unified-style text output you can copy. This tool draws a visual two-column view with line numbers and word-level highlights, which is easier to scan.

Are word changes shown inside a changed line?

Yes. When a removed line is paired with an added line, the words that differ are marked in both columns. Very long lines skip the word highlighting to keep the page responsive.

Does it understand code syntax?

No. It compares plain text, so a moved block shows as removed and added. For structured data, such as JSON, a dedicated JSON diff is better.

Is my code uploaded?

No. The text is processed in your browser and is not uploaded, stored or sent to a server, so it is fine to use with drafts, lists and private notes.