Text Diff
Compare two blocks of text and see exactly what changed — added lines in green, removed lines in red — line by line, in your browser.
Differences
How to use it
A text diff compares two versions of the same content — an original and a changed version — and shows exactly what changed between them. Instead of reading both blocks side by side and hunting for differences yourself, the tool marks each line as added, removed, or unchanged, so you can see the edit at a glance instead of guessing where it happened. Under the hood, the comparison works by finding the longest common subsequence (LCS) of lines shared between the two texts. Rather than matching line 1 to line 1 and line 2 to line 2, the algorithm looks for the longest run of lines that appears in the same order in both versions and treats everything else as an edit. This is what keeps unchanged lines aligned even when a line is inserted or deleted earlier in the text — a single added paragraph at the top won't make every line below it look like it changed too. For example, paste an original paragraph into the left box and an edited version — with one sentence reworded — into the right box. The result shows the old sentence as a removed line in red, the new sentence as an added line in green, and every other line in the paragraph stays neutral because it didn't change. That neutral coloring is the point: it tells you at a glance that the rest of the text is untouched, so you only need to review the highlighted lines. To use the tool, paste your original text into the left box and the changed version into the right box. The comparison updates as you type or paste, so you don't need to click a button to see the result. Read through the highlighted output: red lines were removed, green lines were added, and everything else stayed the same. This is useful any time you need to review what changed between two versions of text: checking edits to an article or contract before approving them, comparing two versions of a config file or a short code snippet, seeing what changed in a message or email draft, or proofreading a document against its previous draft. It compares whole lines of text, in your browser — nothing is uploaded to a server.
Frequently asked questions
- How does the comparison work?
- It splits both texts into lines and finds the longest common sequence, so unchanged lines line up and only real additions and removals are highlighted.
- Is my text sent to a server?
- No. The comparison runs entirely in your browser — your text never leaves your device.
- Does it compare word by word?
- This tool compares whole lines. A line that changed shows as one removed line plus one added line.
- What is a text diff?
- A text diff is a comparison between two versions of text — an original and a changed version — that shows exactly which lines were added, removed, or left unchanged. It's the same idea used by version control tools like Git, but applied directly to plain text such as an article, a contract, or a config file, right in your browser.