Text Diff
Compare two texts line by line.
Compare two versions of text and see exactly which lines were added, removed or changed. Useful for reviewing edits, config files and drafts.
Loading the interactive tool… This page needs JavaScript to run the Text Diff.
How to use Text Diff
- Paste or type your text into the editor.
- Choose the transformation or options you need.
- Run the tool and review the result.
- Copy the finished text into your document, CMS, or project.
How Text Diff works
Enter the original text on the left and the changed text on the right. The tool compares them line by line by position: line 1 against line 1, line 2 against line 2, and so on. The result is a JSON list with the line number, the left text, the right text and a same flag. It does not detect moved or inserted lines, so one insertion can mark every later line as different.
Worked example
Input: left lines a, b and right lines a, c, d → Output: line 1 same true, line 2 b versus c same false, line 3 empty versus d same false.
Common uses
- Compare two versions of a short document or list.
- Check whether two config snippets are identical line for line.
- Confirm that a copied block of text matches the source.
Best for
- text workflows
- quick text diff tasks
- browser-based utility work
Tips for better results
- Paste representative text rather than a small sample when checking counts or formatting.
- Review the result before replacing your original content.
- Keep a copy of important source text before bulk transformations.
Frequently asked questions
How does the comparison work?
It compares both texts line by line and highlights lines that differ.
Can I compare code?
Yes, any plain text works, including code, JSON and configuration files.
Is my text sent anywhere?
No. The comparison runs entirely in your browser.
Related tools
- JSON Diff — Compare two JSON documents and list every difference.
- Add Line Numbers to Text — Number every line of text with a custom start and separator.
- Fancy Text Generator — Turn plain text into stylish Unicode fonts for bios and posts.
- Remove Accents from Text — Strip diacritics and accents from letters.
- Text Repeater — Repeat any text up to 1,000 times with a separator.
- Text Reverser — Reverse text character by character.