Text Compare & Replace

Compare text in unified or side-by-side views, then preview and apply plain or regex replacements.

Workspace

Preparing the text tools…
Comparison options
Guide

How to use

  1. Choose line comparison or live find and replace.
  2. Enter or load text, then configure comparison tolerances or replacement matching and scope.
  3. Review changes in a unified or side-by-side view, or inspect replacement matches and locations before copying, exporting, or applying the result.
Help

Frequently asked questions

How is text compared?

The comparison uses a line-based longest-common-subsequence calculation and marks unchanged, added, and removed lines. You can ignore case, spacing differences, or blank lines.

Can I hide unchanged lines?

Yes. After comparing, hide unchanged lines to focus on additions and removals. You can switch between a compact unified diff and a line-numbered side-by-side view.

Why did my comparison disappear after editing?

A comparison is a snapshot. When either text or an option changes, the old result is hidden so it cannot be mistaken for the current comparison.

Can find and replace use regular expressions?

Yes. Enable regular expressions to use JavaScript regex syntax, replacement groups such as $1, multiline anchors, and dot-all matching.

How does Preserve capitalization work?

For case-insensitive plain-text searches, it adapts the replacement to lowercase, UPPERCASE, or Initial-capital matches. It is disabled for case-sensitive and regular-expression searches.

Can I inspect matches before applying them?

Yes. The match preview shows line and character locations plus regular-expression capture groups for the first 100 replacements. You can export that preview as JSON.

Can I undo an applied replacement?

Yes. Use result as input stores the previous source for one-step undo. Directly editing the source begins a new workflow and clears that undo state.

What is the difference between multiline and dot-all?

Multiline changes how ^ and $ match line boundaries. Dot-all lets a dot match line-break characters.

Are there processing limits?

Yes. Comparisons are limited by total characters and line-matrix size, while replacement input and search expressions have separate limits to keep the browser responsive.