123024.com · Text Diff

Text Diff

Text Diff is a free online tool for comparing two texts with line-level and word-level precision. Side-by-side or inline view with highlighted changes. Runs entirely in your browser — no data is sent to any server.

What is a diff?

A diff is a structured comparison between two pieces of text that highlights what was added, what was removed, and what stayed the same. Developers use it every day to review code changes, audit configuration drift, and compare JSON or CSV files.

This tool runs the comparison entirely in your browser. Nothing you paste or upload is sent to any server.

Common Use Cases

Comparing two configuration files (JSON, YAML, .env) to spot drift between environments.

Reviewing a code change before pasting it into a commit, especially when working outside an editor.

Reconciling two versions of a document, log, or query result side by side.

How to Compare Two Texts

1. Paste or upload your texts — Enter your original text in Text A and the modified version in Text B. You can also upload files into either input.

2. Choose your view — Toggle between side-by-side (shows both texts with aligned changes) and inline (shows additions and deletions in a single stream). Switch Horizontal / Vertical for the editor layout.

3. Review the highlighted changes — Added lines appear in green, removed lines in red. Word-level highlights within changed lines show exactly which words differ.

Frequently Asked Questions

Is there a file size limit? Diff computation runs entirely in your browser. There is no hard size limit; texts up to a few MB usually compare fine. Performance depends on your device and text length.

Can I ignore whitespace or case differences? Yes. Toggle Ignore whitespace and Ignore case in the toolbar. These settings filter out superficial changes so you can focus on meaningful differences.

What algorithm does the diff use? The tool computes a line-level LCS diff, then runs a second word-level pass on adjacent changed lines to highlight which specific words were added or removed.

Tips

  • Use Format JSON on either pane when comparing pretty-printed configs.
  • Copy Diff exports a unified +/- patch you can paste into reviews or chats.
  • Keep sensitive data local — nothing is uploaded.