Text Diff Checker
Compare two texts side by side and highlight additions, deletions, and unchanged lines.
Original Text
Modified Text
Every developer has been there — you have two versions of a config file, a SQL query, or a README and you need to know exactly what changed. Manual scanning misses things. A proper diff tool doesn't. This checker compares any two pieces of text and highlights every addition, deletion, and modification line by line, right in your browser. No data ever leaves your machine, which matters when you're comparing credentials, private configs, or unreleased code. The diff algorithm powering this tool is the same class of logic used by git diff, GNU diffutils, and code review tools. For JSON specifically, consider pairing this with a JSON formatter first so the structure is normalized before diffing. Need to compare larger datasets? Tools like jq can pre-process JSON before you paste it here. For version-controlled projects, GitHub pull requests offer a similar visual diff in a collaborative workflow.
How to Use the Text Diff Checker
Paste Text A (Original)
Paste the original version of your text into the left panel. This can be code, a config file, SQL, JSON, or plain prose.
Paste Text B (Modified)
Paste the modified version into the right panel. The diff updates immediately — no button to click.
Review the Differences
Added lines are highlighted in green, deleted lines in red. Changes within a line are shown at word level so you can spot exactly what changed.
Example Comparison
Example: Config file change
Text A (original):
host=localhost
port=5432
database=myapp
pool_size=5Text B (modified):
host=db.production.com
port=5432
database=myapp
pool_size=20
timeout=30Frequently Asked Questions
Does this tool send my text to a server?
No. The comparison runs entirely in your browser. Your text is never uploaded anywhere, which makes it safe for private configs, credentials, and unreleased code.
What kind of differences does it detect?
It detects additions (new lines or words), deletions (removed content), and modifications (changed lines). Both line-level and word-level highlighting are supported.
Can I compare code, not just prose?
Yes — paste any plain text: code, config files, SQL, JSON, YAML, Markdown, or plain prose. The tool doesn't care about the format. For JSON, consider formatting it first so whitespace differences don't create noise.
How is this different from git diff?
git diff requires a repository and command-line access. This tool works instantly in your browser with any two text snippets — no git history, no terminal needed.
About Text Diff
This tool uses the Longest Common Subsequence (LCS) algorithm to compare texts line by line, the same approach used by tools like git diff. Lines unique to the original are shown in red, lines added in the modified version in green, and unchanged lines in white.