Skip to content
Categories
Text Diff
Compare two texts and display the differences line by line.
Overview
- Compares two texts line by line and shows added and removed lines in different colors.
- Lets you compare the before and after of a configuration file, document, or code, and see at a glance what changed.
- Whether the text ends with a trailing newline is absorbed internally and does not affect the result, so you only see the changes that actually matter.
Usage
- Enter the original text on the left and the text to compare against on the right.
- Click the "Compare" button.
- The differences are displayed line by line (+: added line, -: removed line, unchanged lines are shown as-is).
Example
Input
Before: apple banana cherry After: apple blueberry cherry
Output
apple - banana + blueberry cherry
Use Cases
- Pasting code or a config file before and after a change to review what changed
- Comparing an old and new version of a document to identify additions and deletions
- Checking whether text shared by someone else exactly matches the text you have
FAQ
Does it support character-level diffing?
No. Currently only line-level diffing is supported.
Does a trailing newline affect the result?
No. A trailing newline is added internally before comparison, so lines with identical content are treated as "unchanged" regardless of whether they end with a newline.
Is the text I enter sent anywhere?
No. All comparison happens entirely in your browser.
Notes
- Only line-level diffing is supported. Even if only part of a line changed, the entire line is treated as removed and added.
- The diff result exists only on the page and is lost on reload, so copy and save it if you need to keep it.
- Comparing very long texts may make browser processing slow.
Related Tools
Convert text to camelCase, snake_case, and other naming conventions.
Compare two JSON values regardless of key order and display the structural differences.
Format and normalize Markdown to make it easier to read.
Preview Markdown in real time.