100% local processing — your files and data never leave this browser. No uploads, no server storage.

OnboxTools

Free · Browser-only · No upload

Compare text online with side-by-side diff

Text diff with line numbers, color highlights, and live difference count

Paste or import two blocks of text to compare them instantly. Removed lines appear in red, added lines in green, and unchanged content stays neutral — with line numbers on both sides so you can jump straight to the first change.

This text comparison tool runs entirely in your browser. Compare contracts, code snippets, essay drafts, or log excerpts without uploading anything to a server.

Compare by
Original Text
Compare Text
Line Diff
Left0ln
Right0ln
Diffs0

Paste text in both panels to compare

More Text Utilities

🔓
Base64 Decoder
🧬
Base64 Encoder
🔡
Case Converter
Cron Generator
🎨
CSS Minifier
📐
CSS Unminifier
📆
Date Format Converter
📅
Date to Unix
🔎
Find and Replace
🛡️
HTML Escape
📰
HTML Minifier
↩️
HTML to Markdown
🔓
HTML Unescape
📄
HTML Unminifier
📋
Markdown Preview
🔄
Markdown to HTML
🎲
Random Number
🔤
Random String
🔍
Regex Tester
🧹
Remove All Whitespace
↩️
Reverse Text
✂️
Split String
⚖️
Text Compare
🔁
Text Repeater
📖
Text Viewer
🌍
Time Zone Converter
🕐
Unix Time to Date
🔗
URL Encoder
🔤
UTF-8 Decoder
🌐
UTF-8 Encoder
📊
Word Counter

Browse by category

How line diff counts differences

The engine splits both texts on newline characters, then walks the two line arrays with a longest-common-subsequence algorithm. Lines present only on the left count as removed; lines present only on the right count as added; matching consecutive lines count as unchanged.

The difference total is the number of added lines plus removed lines — not the number of edit hunks. Two adjacent deleted lines contribute two to the count, which matches how most text diff tools report scope.

diffCount = removedLines + addedLines

Example: comparing two contract clauses

Original: "The vendor shall deliver within thirty (30) days." Revised: "The vendor shall deliver within forty-five (45) days." In word mode, only "thirty (30)" and "forty-five (45)" highlight — the rest of the sentence stays neutral.

If the revised version adds a second sentence on a new line, line mode shows row 1 as unchanged (if the first sentence matched) and row 2 as added in green with a blank left line number.

Diff colour reference

FromToResult
Red / strikethroughRemovedPresent only in original
Green highlightAddedPresent only in compare panel
NeutralUnchangedIdentical on both sides
Red gutter numberChanged line (left)Line differs or was removed
Green gutter numberChanged line (right)Line differs or was added

Complete guide to text compare and diff checking online

What a text compare tool does

A text compare tool shows you exactly where two versions of a document diverge. Instead of reading both copies line by line, you paste them side by side and let a diff engine highlight additions, deletions, and unchanged passages in different colours.

Writers use text to text comparison when revising contracts or policy drafts. Developers compare config files, README sections, and API response samples. Support teams check whether a customer pasted the right paragraph from a knowledge-base article. The workflow is the same: original on the left, revised on the right, differences in the panel below.

This page is a free text comparator that works on plain text of any kind — prose, markdown, CSV rows, JSON strings, HTML fragments, or mixed content. No sign-up, no upload queue, and no server-side storage.

How to compare two texts online

To compare text online here, paste your baseline into the Original Text panel and the candidate version into Compare Text. The diff updates as you type, so you can tweak a single word and watch the highlight move immediately.

Import .txt, .md, .csv, or other plain-text files when your source lives on disk rather than the clipboard. Line numbers appear in a gutter beside each editor; changed lines are marked in the gutter so you spot edits before scrolling the full diff table.

Switch between Lines and Words mode depending on what you need. Line mode is ideal for code, legal clauses, and multi-paragraph documents where each row should be treated as a unit. Word mode highlights inline edits inside a sentence — useful when only a few tokens changed between two nearly identical paragraphs.

The Diff Visualizer footer shows how many differences were found, plus line counts for each side. Copy the unified diff or save it as a .txt file to attach to tickets, pull requests, or email threads.

Reading the diff: colours and line numbers

Red backgrounds and strikethrough mean content exists only in the original — a removed line or deleted phrase. Green backgrounds mark additions that appear only in the compare panel. Neutral rows are identical on both sides.

The diff table includes two line-number columns. The left column tracks positions in the original; the right column tracks positions in the revised text. When a line was added, the left column is blank; when a line was removed, the right column is blank. This mirrors how professional diff online checker tools present patches.

A difference count at the top tells you how many changed lines (or word segments, in word mode) were detected. Zero diffs with both panels filled means the texts are byte-for-byte identical — handy before you approve a merge or send a final contract.

When to use line diff vs word diff

Line diff treats each newline as a boundary. Two paragraphs that differ by one character on separate lines show as two changed lines, which is what you want when reviewing git-style patches or numbered legal clauses.

Word diff walks character by character inside each block. If a colleague changed "colour" to "color" mid-sentence, word mode surfaces only that token instead of flagging the entire line. Use it for prose, marketing copy, and short messages where inline edits matter more than row structure.

Neither mode understands programming language syntax — for structured JSON, use our JSON Compare tool, which parses trees before diffing. For arbitrary plain text, this text diff online page is the right starting point.

Common workflows: documents, code, and PDF exports

Legal and editorial teams often receive two Word exports of the same agreement. Copy each version, paste here, and check text difference before signing. Pair with Find and Replace when you need to apply a terminology swap after confirming the diff scope.

Engineers paste environment files, nginx configs, or shell scripts to see what changed between staging and production. Line numbers make it easy to reference "line 42" in a stand-up without opening an IDE.

If your source is a PDF, extract text first with our PDF to Text tool, then compare the exports here. PDF comparison at the layout level needs dedicated software; text-level pdf comparison after extraction is fast and works well for contracts and research papers where formatting is secondary to wording.

Remove All Whitespace can normalize pasted content when line breaks from Word or Excel create false diffs. Run cleanup on both sides, then compare again for a fair text difference checker result.

Privacy, performance, and related tools

All comparison runs locally with the diff library in your browser session. Drafts, credentials, and customer data never leave your machine — safe for regulated industries that cannot route content through third-party diffchecker online services.

Very large files may slow the tab; split multi-megabyte logs into sections if scrolling feels sluggish. There is no hard character cap beyond your device memory.

For JSON-specific structural comparison, open JSON Compare. For pattern-based bulk edits after reviewing a diff, use Find and Replace. For counting words in the longer version, try Word Counter. Each tool stays client-side and requires no account.

Detailed guide

Compare two text files before sending

Export or save both versions as plain .txt files. Import each into the Original and Compare panels, or paste from your editor.

Review the Diff Visualizer table, note the difference count, and copy the diff into your email or ticket if the recipient needs to see exactly what changed.

Check difference in text after a colleague's edit

Keep your version in Original Text and paste their revision into Compare Text. Scan red and green rows first — unchanged blocks collapse visually so edits stand out.

Switch to word mode if the diff looks noisy but you suspect only small typos changed inside long paragraphs.

Compare 2 texts from PDF exports

Copy text from each PDF or run both through PDF to Text first for cleaner line breaks.

If spurious diffs appear from extra blank lines, run Remove All Whitespace on both sides, then compare again.

Common questions

Text Compare FAQ

How do I compare two texts online for free?

Paste original text on the left and revised text on the right. Highlights and line numbers appear instantly with no sign-up and no upload.

What is the difference count?

In line mode it is the total of added and removed lines. In word mode it counts added and removed word segments. Identical texts show zero diffs.

Can I compare text from files?

Yes. Import .txt, .md, .csv, .json, .html, .xml, or .log files into either panel using the Import button.

Does this work like a diff checker online for code?

Line mode works well for source files and configs. For JSON objects, JSON Compare ignores whitespace and key order for cleaner results.

What is the difference between line and word mode?

Line mode compares row by row — best for documents and code. Word mode compares inline — best when sentences differ by a few words.

Is my text uploaded to a server?

No. The text comparison tool runs entirely in your browser.

Does the Text Compare send my input to a server?

Yes. Everything runs in your browser. Your input is not uploaded, logged, or stored on our servers.

Do I need an account?

No account or sign-up is required. Open the page and start using the tool immediately.