CraftTools

Text Diff Checker

Guide: Regex Cheat Sheet for Beginners

Nothing you enter or choose here leaves your device. This tool runs in your browser.

Reading the result

Paste the original on the left and the changed version on the right. Lines only in the left are marked red as removed. Lines only on the right are marked green as added. Inside a changed line, the individual words that differ are highlighted, so you can see that one word changed instead of hunting through a long sentence. A summary at the top counts the added and removed lines.

A small example

Original:
The meeting is on Tuesday at 10:00.
Bring the signed contract.
Parking is free.

Changed:
The meeting is on Wednesday at 10:00.
Bring the signed contract and your ID.
Parking is free.

The tool shows lines one and two as changed, with Tuesday and Wednesday highlighted in the first, and the extra words in the second. Line three matches, so it's left plain.

What people use it for

  • Contracts and policies. See exactly what a counterparty changed between two drafts.
  • Essays and articles. Compare an edited version with your original.
  • Config files. Find the one setting that differs between a working file and a broken one.
  • Code snippets and SQL. Check what changed without setting up a repository.
  • Lists. Compare two exports of names or ids to find what's new or missing.

The options

OptionDoesUse when
Ignore caseTreats Hello and hello as equalCapitalization isn't the point
Ignore extra whitespaceTreats double spaces and tabs as single spacesOne side was reformatted
Show only changesHides lines that matchFiles are long and little changed

Getting a cleaner diff

  1. Make line endings consistent. Files saved on Windows and Mac can differ at every line end.
  2. Format both sides the same way first. Run two JSON files through the JSON formatter with sorted keys, and a diff shows only real changes.
  3. Sort lines if order doesn't matter. The sort lines tool makes two lists comparable.
  4. Turn on ignore whitespace if an editor changed indentation.

Limits to know

The comparison works line by line and finds the longest set of lines both sides share. It's good at additions, removals and edits. It's weaker with a paragraph that's been moved, which shows up as removed in one place and added in another. For structured data, the JSON diff compares by key and value and so isn't thrown by reordering. Text stays in your browser, so it's safe to compare private drafts.

Checking a revised contract

  1. Paste the version you sent on the left and the one that came back on the right.
  2. Turn on ignore extra whitespace, so reflowed paragraphs don't hide the real edits.
  3. Go through every red and green line, not only the ones with a number in them. Dates, amounts and the word not are easy to miss.
  4. Look for deleted lines on the left that have no counterpart on the right. A removed clause is a change too.
  5. Keep a copy of the result with your notes, so there's a record of what you agreed to.

Written by Akinrinmade Michael · Updated October 24, 2026

How to use

  1. 1Paste the original text on the left and the changed text on the right.
  2. 2Read the summary of added and removed lines.
  3. 3Look at the side-by-side view. Red marks removed text and green marks added text.
  4. 4Use the options to ignore case or extra spaces, or show only the changes.

Frequently asked questions

How does the comparison work?

It compares the two texts line by line to find the longest set of lines they share, then highlights the individual words that differ inside changed lines.

Can I compare code?

Yes. The text is shown in a monospace font and line numbers are included, so it works well for code, config files and JSON.

What do "ignore case" and "ignore extra whitespace" do?

They treat "Hello World" and "hello world" as the same line, so only meaningful changes are highlighted.

Is my text uploaded anywhere?

No. The comparison runs entirely in your browser and nothing is sent to a server.

Read the guide

Learn how this works and how to get the most from it.

Developer

Regex Cheat Sheet for Beginners

A plain-English guide to regular expressions: character classes, quantifiers, groups, flags and examples you can test.

3 min read

Word Counter

Count words, characters, sentences and paragraphs as you type.

Find and Replace

Find and replace text online, with regex, case and whole-word options.

Sort & Dedupe Lines

Sort lines A-Z, reverse them, remove duplicates and trim whitespace.

Regex Tester

Test regular expressions live, with match highlighting and groups.