Text / File Diff Tool

Plaintext & File Diff

Compare arbitrary text files, code snippets, logs, markdown, and config files side-by-side or inline as plain text.

View:
Processed 100% locally in your browser
Loading Code Editor...
Loading Code Editor...
Diff Summary Metrics
+0 Added-0 Removed0 Unchanged100% Match
Loading Monaco Diff Editor...
Technical Documentation & Reference

Complete Guide to Text & Code Difference Algorithms

Understand how Myers' diff algorithm and Longest Common Subsequence (LCS) calculate text revisions, whitespace normalization, and similarity percentages.

Comparing two text documents or code files to pinpoint exactly what was added, deleted, or modified is a cornerstone of version control systems like Git. Whether reviewing pull request changes, debugging application server logs, or inspecting environmental configuration files (.env, YAML manifests, NGINX configs), visual difference tools make changes immediately obvious.

At the core of modern diff tools is Myers' Diff Algorithm and the Longest Common Subsequence (LCS) problem. The algorithm finds the shortest sequence of edit operations (insertions and deletions) necessary to transform document A into document B.

Side-by-Side vs. Inline Diff Views

Side-by-Side (Split) view places the original document on the left and the modified document on the right, providing clear horizontal spatial context. In contrast, Inline (Unified) view combines both files into a single linear vertical stream, highlighting removed lines with a red background and added lines with a green background.

How to Use This Tool

1

Provide Original Text

Paste your base text or upload an original file into the left pane of the editor.

2

Provide Modified Text

Paste the updated or revised text or file into the right pane of the editor.

3

Adjust Comparison Settings

Toggle Ignore Whitespace or Ignore Case to filter out irrelevant formatting or capitalization differences.

4

Review Metric Breakdown

Inspect the similarity percentage, count of added lines, removed lines, and unchanged text segments.

Key Features & Capabilities

Monaco Diff Technology

Uses the same world-class diffing engine found inside Visual Studio Code.

Exact Similarity Metrics

Calculates exact Levenshtein and line-based similarity percentages between documents.

Whitespace & Case Controls

Easily ignore trailing spaces, tab differences, or casing when auditing code revisions.

100% In-Browser Privacy

Compare proprietary source code, credentials, or private logs without cloud upload.

Frequently Asked Questions

What is the difference between side-by-side and unified diff?
Side-by-side diff displays the original and modified files in parallel dual columns. Unified (inline) diff presents all additions and deletions in a single chronological column, similar to git diff output in terminals.
How is the similarity score calculated?
The similarity score is computed based on the ratio of unchanged lines and common character sequences relative to the total length of both documents.
Can I compare programming languages other than JSON?
Yes! The Text Diff tool supports plain text, Python, JavaScript, TypeScript, YAML, Markdown, HTML, CSS, SQL, and any arbitrary text file.
Are my text files sent to any remote server?
No. All diffing operations occur strictly in browser memory on your client device.

Privacy & Security Guarantee

All data processing, AST syntax repairs, and cryptographic operations happen 100% locally inside your browser using native JavaScript and WebAssembly. No inputs, keys, or file payloads are ever transmitted to or stored on remote servers.