Comparison Tools

Compare Texts / Files

Compare two texts with inline highlighting. See additions, deletions, and word-level changes directly on the text.

Your data never leaves your browser — nothing is sent to any server.

Paste text or upload files into both panels to see differences
How to use
  1. 1

    Add the original text

    Paste text into the left panel, or click 'Upload' / drag-and-drop a file. This serves as the baseline for comparison.

  2. 2

    Add the modified text

    Paste or upload the updated version into the right panel. The diff is computed automatically and displayed inline.

  3. 3

    Review inline highlights

    The modified panel highlights differences directly: green for added lines, red strikethrough for removed, and word-level highlights for modified lines. Click 'Edit' to switch back to editing.

  4. 4

    Copy or share

    Click 'Copy Diff' to copy the diff output. Use 'Swap' to invert the comparison direction.

Common errors

Diff shows every line as changed

This usually means line endings differ (Windows CRLF vs Unix LF). Normalize line endings before comparing, or paste both texts from the same source type.

Trailing whitespace causes unexpected differences

Lines that look identical may have trailing spaces or tabs. The diff algorithm compares exact character sequences. Trim trailing whitespace if you want to ignore whitespace-only differences.

Uploaded file shows garbled text

The file may be a binary format (e.g. .docx, .pdf). This tool only supports plain text files. Convert to plain text first, or copy-paste the content directly.

FAQ (6)
How does the diff algorithm work?

This tool uses a longest common subsequence (LCS) algorithm to compare the two texts line by line. It finds the longest sequence of lines that appear in both texts in the same order, then marks remaining lines as additions or deletions. For modified lines, a second word-level diff highlights the exact changes within each line.

What do the colors in the diff output mean?

Green background means the line was added. Red strikethrough text shows removed lines. For modified lines (partially changed), the background is subtle yellow with individual changed words highlighted in green (added) and red (removed). Unhighlighted lines are unchanged.

Can I upload files to compare?

Yes. Click the 'Upload' button above either panel to select a file, or drag and drop a file directly onto the panel. The tool accepts any text-based file: source code, config, CSV, JSON, Markdown, logs, and more.

Can I compare code files with this tool?

Yes. The diff viewer works with any plain text including source code in any programming language, configuration files, CSV data, logs, and prose. The monospace font makes code comparison especially readable.

Is there a size limit for the text I can compare?

The tool runs entirely in your browser, so the practical limit depends on your device's memory. It handles files up to several thousand lines without issues. For very large files (10,000+ lines), you may experience a brief computation delay.

Is my data sent to any server?

No. All comparison and diff computation happens locally in your browser. Your text never leaves your device. The tool works fully offline once the page is loaded.

Learn more

Diff Viewer — Inline Highlighted Text Comparison

Compare two versions of any text with differences highlighted directly inline — no +/- symbols or line numbers cluttering the view. Upload files or paste text, and see changes highlighted at both the line and word level with intuitive color coding.

Inline Highlighting Instead of +/- Diff

Traditional diff tools use a GitHub-style format with + and - prefixes. This tool takes a different approach: differences are highlighted directly on the modified text. Added lines get a green background. Removed lines appear with a red strikethrough. Modified lines show word-level changes with individual words highlighted in green (added) and red (removed), so you can see exactly what changed within a line.

File Upload and Drag & Drop

Click the Upload button or drag-and-drop any text file onto either panel. The tool accepts source code, config files, JSON, CSV, Markdown, logs, and any other plain-text format. This makes it easy to compare two versions of a file without manually copying and pasting their contents.

Word-Level Precision

When a line is modified rather than fully added or removed, the tool runs a second pass to identify the exact words that changed. This is especially useful for code reviews where a single variable name, value, or operator changed within a long line — the word-level highlighting draws your eye directly to the change.

Use Cases

Developers comparing code versions, technical writers tracking document revisions, system administrators diffing configuration files, data engineers spotting schema changes in CSV exports — any scenario with two versions of a text document benefits from clear inline diff visualization.

Privacy

Everything runs client-side in your browser. No data is sent to any server, no files are uploaded externally. The tool works fully offline once loaded.