francescomargiotta.com

Diff Checker: Compare Text and Code

Compare two texts, code snippets, or JSON files directly in your browser: side-by-side or inline view, line and word-level highlighting, 100% private.

100% Client-Side· Your text never leaves your browser · Safe for confidential code and contracts
Presets:
0 lines
0 lines
Differences:+0 additions-0 deletions~0 modifications=0 unchanged
Enter or paste two texts to see the differences in real time.

How this Diff Checker works and why it is secure

A diff checker precisely highlights what was added, removed, or modified between two versions of a text, configuration file, or source code. It is an essential utility for software developers, copywriters, editors, and anyone needing to verify changes made by collaborators or AI assistants.

Unlike many commercial online tools that upload your text to remote servers, this tool executes the entire comparison algorithm (based on Myers diff and LCS) locally in your browser. No confidential code, API keys, passwords, or proprietary contracts are ever sent across the network or stored in external databases.

The Side-by-Side (Split) view aligns the original and modified texts across two synchronized columns with line numbers, making direct visual comparison effortless. The Inline (Unified) view consolidates changes into a single compact stream with standard "+" and "-" markers, matching the output format of version control systems like Git.

Advanced intra-line diffing detects modifications at the individual word and character level within modified lines: you can immediately spot a corrected typo, an altered number, or a renamed variable without having to re-read the entire line.

When comparing data payloads, the "Format JSON" action automatically parses, sorts, and prettifies JSON structures before diffing, eliminating false positives caused by minor indentation or whitespace differences so you can focus strictly on substantive changes.

Frequently asked questions

Is the text I paste sent to or stored on a server?
No, absolutely not. All diff calculations run entirely locally in your browser's JavaScript engine. No text, code snippets, or confidential documents are ever transmitted over the network or saved in any database.
What is the difference between Side-by-Side (Split) and Inline (Unified) view?
The Side-by-Side (Split) view shows the original text on the left and the modified text on the right, making direct line-by-line comparison intuitive. The Inline (Unified) view merges changes into a single column with "+" and "-" markers, identical to the output of `git diff` and ideal for creating patches or viewing on narrower screens.
How does intra-line word-level highlighting work?
When a line has been partially modified, the engine runs a second diff pass across individual words and characters within that line. Added or removed words are highlighted with distinct background colors, saving you from hunting for minor alterations.
Can I compare complex JSON payloads or configuration files?
Yes. If your texts contain JSON data, you can click the "Format JSON" button to prettify and indent them cleanly before diffing, preventing formatting differences from obscuring actual data changes.

From the books

LLMs Unpacked
LLMs Unpacked

From Tokens to Hardware: How Generative AI Really Works

See the book

Related tools