Paste two texts side by side to see their differences highlighted. Added lines are shown in green, removed lines in red. A summary shows the total number of added and removed lines. Everything runs locally in your browser.
Text Diff
Compare two texts and see highlighted differences
Spot exactly what changed between two texts
A diff is the fastest way to answer "what's different?" โ between two versions of a file, two config snippets, a draft and an edit, or what you have versus what a colleague sent. This tool highlights additions in green and removals in red, line by line, the same way code review and version control show changes.
It all runs in your browser, so it's safe for pasting source code, .env files,
contracts, or anything private โ nothing is uploaded or stored.
How to use it
- Paste the original text on one side.
- Paste the updated text on the other.
- Read the highlighted differences and the added/removed summary; edits update the diff live.
Related tools
- Making the same change across text? Use Find & Replace.
- Comparing JSON? Format both with the JSON Formatter first.
- Need to sort lines before diffing? Try Line Sort.
Frequently asked questions
How do I compare two pieces of text?
Paste the original text on one side and the changed text on the other. The tool highlights the differences instantly โ added content in green, removed content in red โ with a summary of how many lines changed.
Is my text sent to a server?
No. The comparison runs entirely in your browser. Nothing is uploaded, logged, or stored โ safe for pasting code, config, contracts, or any private text.
Does it diff by line, word, or character?
It highlights changes line by line, which is how code review and version-control diffs work. Within changed lines you can see exactly what was added or removed, so small edits stand out without scanning the whole block.
Can I compare code, JSON, or config files?
Yes โ it works on any plain text: source code, JSON, YAML, .env files, CSV, prose, logs. For comparing two JSON objects specifically, formatting both with the JSON Formatter first makes structural differences much easier to spot.
Does it handle different line endings or whitespace?
Lines that differ only by trailing whitespace or line endings can show as changes. If you get noisy results, normalize both inputs (trim trailing spaces, consistent line endings) before comparing.
Related Tools
Get weekly dev tools and tips