Diff Checker: Compare Text and Code
Paste an original and a changed version to see exactly what differs, line by line. Added lines show in green, removed lines in red, and a running count tells you how much changed.
How to compare two texts
- Paste the original text into the left box.
- Paste the changed text into the right box.
- Read the unified diff below: green lines were added, red lines were removed.
Examples
A changed middle line
a b c
a - b + x c
An added line
one two
one two + three
Frequently asked questions
What does a diff show?
It shows how two texts differ. Lines only in the original are marked as removed, lines only in the changed version are marked as added, and lines present in both are shown as unchanged.
Is this a line diff or a character diff?
This tool compares line by line. A whole line counts as changed if any part of it differs, which is the clearest view for code and config files. It does not highlight individual characters within a line.
Is my text private?
Yes. The comparison runs entirely in your browser. Nothing you paste is uploaded or stored on a server.
What are common uses for a diff checker?
Reviewing code changes, comparing two config files, spotting edits in contracts or copy, checking what a tool rewrote, and confirming two lists match.
How does it decide which lines match?
It uses a longest common subsequence algorithm to find the largest set of lines that appear in both versions in order, then reports everything else as added or removed. That keeps unrelated edits from cascading.
Does it handle Windows and Mac line endings?
Yes. Carriage returns and CRLF endings are normalized before comparing, so two files that differ only in line endings show as identical.
Related tools
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
Hash Generator
Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes from any text. Live, lowercase hex output that runs entirely in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.
Base64 Decode
Decode Base64 to plain text online. Paste a Base64 or base64url string and get instant UTF-8 output. Free, fast and runs in your browser.