What is Text Diff/Compare?
The Text Diff/Compare tool highlights the exact differences between two pieces of text. See additions, deletions, and modifications color-coded side by side or in a unified view. It works for code versions, document revisions, and configuration files alike.
The tool runs a Myers diff and catches reordered blocks and one-line tweaks alike. Compare line by line or switch to word granularity for prose, flip Ignore whitespace to skip pure formatting changes, tick Ignore case so casing reformats don't register, and hit Swap to reverse which side is the original. Read the result as unified output (with + and - prefixes, ready to paste into a commit message) or as side-by-side panels. On long files it collapses unchanged stretches and gives you prev/next arrows to step through each change. Both inputs stay free-form, so it handles code, JSON, prose, or log lines.
How to use
- Paste the original text in the left panel and the modified text in the right panel.
- View the highlighted differences: green for additions, red for deletions, and yellow for modifications.
- Toggle between side-by-side and unified diff views, or copy the diff output for documentation.
When to use
- Reviewing your own edits to an essay or contract before sending the final version.
- Spotting what changed between two server config files when a service stops working.
- Cross-checking translated documents against the source to confirm nothing was dropped.
Result
A developer pastes two versions of a config file and instantly sees that 3 lines were added, 1 was removed, and 2 were modified — with each change highlighted in context.
FAQ
- Does it diff character by character or line by line?
- Either. Line mode (the default) treats a whole line as one unit, so a single typo flags the full old line as removed and the new one as added, with the exact changed characters highlighted inside. Switch to Word mode and it tracks individual words instead, which reads better for prose and config values.
- Will it handle large files, like a 5000-line log?
- Yes. For long inputs the tool folds away big unchanged stretches on its own, keeping a few lines of context, so you mostly see what actually changed. Use the up and down change arrows above the diff to jump straight from one edit to the next, and switch to the unified view if the side-by-side columns feel cramped.
- Does whitespace count as a difference?
- By default, yes: a trailing space, an extra blank line, or a tab versus spaces all show up as changes. Tick Ignore whitespace and those formatting-only differences drop out, so you see just the real edits. Word mode also collapses whitespace runs on its own.
- Can I copy just the diff output, not both inputs?
- Yes. The copy button grabs the unified diff (with + and - markers) so you can paste it straight into a pull-request description, an email, or a documentation note.
- Is this the same as git diff?
- The underlying algorithm is similar (Myers diff), so output for the same two inputs will match git's line diff. The difference is it works on any two text blocks, no repository or commit history needed.
Related Tools
Rhyme Finder
Find perfect and near rhymes for any word
Anagram Solver
Find all valid anagrams of any word
Unicode Lookup
Search Unicode by name or code
URL Encoder/Decoder
Encode and decode URLs instantly
NATO Phonetic Alphabet
Convert text to NATO phonetic alphabet
Paragraph Counter
Count paragraphs in your text