---
title: Text Diff Tool — Compare Two Texts with Character-Level Highlighting
url: https://varstatt.com/toolkit/diff
description: Compare two texts side-by-side or inline with character-level diff highlighting. Additions, deletions, and changes shown in real time.
section: Developer Toolkit (https://varstatt.com/toolkit)
tags: data
---
# Text Diff

Compare two texts side-by-side or inline with character-level diff highlighting. Additions, deletions, and changes shown in real time.

## How It Works

1. **Enter two texts** — Paste the original text on the left and the modified text on the right.
2. **See changes live** — Additions (green) and deletions (red) are highlighted in real time as you type.
3. **Review changes** — Switch between side-by-side and unified views. Character-level highlighting shows exactly what changed within lines.

## FAQ

### What is a character diff tool?

A character diff tool compares two texts and highlights exactly which characters were added, removed, or changed — not just which lines differ. This gives you precise, granular visibility into changes, which is especially useful for code reviews, config file updates, and proofreading.

### How is the diff calculated?

The tool uses a line-level diff algorithm, then applies character-level diffing within changed lines for precise highlighting.

### Can I compare code files?

Yes. It works with any plain text — code, prose, config files, logs, etc.

### Is there a size limit?

No hard limit, but very large texts (100K+ lines) may take a moment to process.

### How do I generate a diff?

Paste the original text on the left and the modified text on the right. The diff generator highlights additions, deletions, and character-level changes in real time — no setup or account required.

## Usage

This tool runs entirely in the browser — visit the URL above to use it.

Prefill inputs via URL parameters:

- `https://varstatt.com/toolkit/diff?left=...&right=...`
