Boneyard Tools

Diff Checker: Compare Text and Code

Paste an original and a changed version, or drop two files, to see exactly what differs. Switch between a side by side and a unified view, drill from line level down to the exact words and characters that changed, ignore whitespace or case, collapse the unchanged parts, and export a standard .diff file. Everything runs in your browser, so nothing you compare is ever uploaded.

How to compare two texts

  1. Paste or drop the original on the left and the changed version on the right.
  2. Pick a mode (Line, Word or Character) and a view (side by side or unified).
  3. Read the highlighted differences, then copy or download the diff.

Examples

A reworded line

return 'Hi ' + name;  vs  return `Hello, ${name}!`;
One modified line, with only the changed words highlighted on each side.

An added line

one
two
  one
  two
+ three

Frequently asked questions

What does a diff show?

It shows how two texts differ. Lines only in the original are marked as removed, lines only in the changed version are marked as added, lines that were edited are shown as modified with the exact changed words highlighted, and matching lines are shown as unchanged.

Can it highlight word and character changes, not just whole lines?

Yes. In Line mode, an edited line shows only the changed words highlighted on each side. You can also switch to Word or Character mode to compare the whole text at that granularity, which is ideal for prose and for spotting a single changed digit or letter.

What is the difference between side by side and unified?

Side by side shows the original and changed text in two aligned columns, which is great for reviewing edits. Unified stacks them into one column with - and + markers, the same format used by patches and code review tools, and is what the .diff export uses.

Can I ignore whitespace or case?

Yes. Turn on Ignore whitespace to treat lines that differ only in spacing or indentation as equal, and Ignore case to treat differences in capitalization as equal. The original text is always shown as you pasted it, the options only affect matching.

Is my text private?

Yes. The comparison runs entirely in your browser. Nothing you paste or drop is uploaded or stored on a server, so it is safe for private code, contracts and documents.

How does it decide which lines match?

It uses a longest common subsequence algorithm to find the largest set of lines that appear in both versions in order, then reports everything else as added, removed or modified. That keeps one edit from cascading into a wall of false changes. Windows and Mac line endings are normalized first.

Related tools