Diff Checker Online — Compare Two Texts Line by Line
Free online diff checker: compare two texts or code files line by line with color-coded changes and a copyable unified diff. No upload — runs 100% in your browser.
About Diff Checker
Paste an original text and a changed version, click Compare, and see exactly which lines were added, removed, or kept — color-coded like a code review. The diff is computed with the same longest-common-subsequence algorithm that git uses, entirely in your browser, so you can safely compare confidential config files, logs, or contracts without sending them anywhere.
How to use Diff Checker
- Paste the original text into the left box and the changed text into the right box (or edit either one directly).
- Click Compare to see the color-coded line-by-line result: red lines were removed, green lines were added.
- Use Copy diff to grab a unified-diff-style summary (+/- prefixes) you can paste into a chat or pull request.
How this diff checker works
Line-based diff with LCS
The tool splits both texts into lines and computes their longest common subsequence (LCS) with classic dynamic programming. Lines that appear in the LCS are the unchanged backbone; everything else on the left side is a removed line, everything else on the right side is an added line.
This is the same family of algorithms used by git diff and patch tools, applied at line granularity. Comparing is instant for typical documents; as a safety measure for browser memory, inputs are capped at 5,000 lines each.
Reading the result
The result is rendered as a unified view: unchanged lines appear once, removed lines are tinted red with a − marker, and added lines are tinted green with a + marker. The summary above the output tells you exactly how many lines were removed, added, and kept.
Copy diff produces the classic unified-diff-style text (lines prefixed with -, +, or a space), which is handy for sharing the change in a ticket, chat message, or code review.
Why compare text in the browser?
Most online diff tools upload both documents to a server. When you are comparing contracts, credentials files, or internal logs, that is a leak by design. Here the comparison runs in JavaScript on your device — the texts never leave the page, and the tool keeps working offline once loaded.
Frequently asked questions
Is this diff checker free?
Yes — free, no account, no limits on how often you compare.
Are my texts uploaded anywhere?
No. The comparison runs entirely in your browser with JavaScript. Your texts never leave your device, and the page keeps working offline once loaded.
Does it compare word by word or character by character?
It compares line by line, like git diff. A line that changed even slightly shows up as one removed line plus one added line, which keeps the result readable for code, configs, and logs.
How large can the texts be?
Up to 5,000 lines per side. Larger inputs are rejected with a clear message so the browser tab stays responsive.
Can I paste code into it?
Yes — any plain text works: source code, config files, CSV, logs, or prose. Whitespace is compared exactly, so indentation changes show up as diffs.
Related tools
Age Calculator
Calculate exact age in years, months, and days, plus total days/weeks/hours lived and a next-birthday countdown.
runs locallyBase64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly in your browser.
WebAssemblyCLI / agentCase Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, and kebab-case.
WebAssemblyCLI / agentColor Converter
Convert colors between HEX, RGB, and HSL formats instantly.
WebAssemblyCLI / agentColor Palette Extractor
Extract the dominant colors from any image as a hex palette with percentage shares.
runs locallyCron Parser / Schedule Explainer
Translate any 5-field cron expression into plain English and see the next 10 run times — computed locally in your timezone.
runs locally