Compare
Compare two texts
Left against right, line by line.
The comparison is a longest-common-subsequence over lines, the same basis editors use: unchanged lines stay in place, removed lines are marked with a minus and added ones with a plus.
It compares whole lines, not characters, so a changed word makes that line show as one removal and one addition. That is the right granularity for prose and configuration, and the wrong one for two versions of a minified file, where every line differs anyway.
Both sides are capped at 2000 lines. The work grows with the two lengths multiplied together, and a cap that says so is better than a tab that stops responding halfway through a comparison you were waiting for.
Questions
Does it ignore whitespace?
No. A line with a trailing space is a different line. Trim first if that is what you want to compare.
Why does one changed word show as two lines?
The comparison is line-based, so the whole line is removed and a new one added. Character-level detail is a different view.
Can I compare two files?
Paste their contents. Both boxes take text, up to the line cap.
Is either text uploaded?
No. Both stay in the page and are gone when it reloads.
More text and code
- Word counterWords, characters, sentences and reading time, counted as you type.
- Case converterTitle Case, sentence case, camelCase, snake_case and the rest, at once.
- JSON formatterValidates JSON and prints it indented, with the parser’s own error.
- Base64Encode text to base64 and decode it back, UTF-8 safe.
- URL encoderPercent-encode text, or read what a %-encoded string says.
- Hash generatorSHA-256, SHA-1 and SHA-512 of any text, from the browser’s own crypto.
- UUID generatorFive version-4 UUIDs from the browser’s random source, ready to copy.
- Timestamp converterEpoch seconds, milliseconds, ISO 8601, UTC and your own time zone.
- Colour converterHEX, RGB and HSL from one value, with WCAG contrast ratios.
- Slug generatorA clean URL slug from any title, accents and punctuation handled.
- CSV to JSONRows to objects, with quoted commas, semicolons and tabs handled.
- Password generator20-character passwords from the browser’s own random source.