Data & Developer Converters

Fast, secure developer format converters. Transform JSON to CSV, YAML, Base64 data URIs, URL encodings, JWT bearer tokens, and Unix epoch timestamps with instant syntax validation.

JSON, Config & Code Diff Checker (100% Private In-Browser)

Compare two JSON payloads, `.env` files, Kubernetes YAML manifests, or source code snippets side-by-side or in unified git-diff view with character-level highlighting.

Report an issue with this converter

Side-by-Side Text & Code Difference Inspector

Original Version (Left / A)16 lines
Modified Version (Right / B)18 lines
Similarity53%
Insertions+9
Deletions-7
Unchanged Lines9
Split Diff View25 total rows
1 {1 {
2 "name": "zone-api",2 "name": "zone-api",
3- "version": "1.0.4",3+ "version": "1.1.0",
4 "private": true,4 "private": true,
5- "description": "High performance calculations engine",5+ "description": "High performance calculations & conversions engine",
6 "dependencies": {6 "dependencies": {
7- "express": "^4.19.2",7+ "express": "^4.21.0",
8 "cors": "^2.8.5",8 "cors": "^2.8.5",
9- "dotenv": "^16.4.5"9+ "dotenv": "^16.4.5",
10+ "qrcode": "^1.5.4"
10 },11 },
11 "settings": {12 "settings": {
12- "rateLimit": 100,13+ "rateLimit": 250,
13- "cacheTtlSeconds": 3600,14+ "cacheTtlSeconds": 7200,
14- "enableTelemetry": false15+ "enableTelemetry": true,
16+ "debugMode": false
15 }17 }
16 }18 }
Conversion Parameters & Specs

JSON, Config & Code Diff Checker (100% Private In-Browser) — Format Breakdown

Compare two JSON payloads, `.env` files, Kubernetes YAML manifests, or source code snippets side-by-side or in unified git-diff view with character-level highlighting.

← Full Text & Code Diff Inspector

Active Preset Parameters

modes
Split (Side-by-Side) & Unified Git Diff
options
Ignore Whitespace, Ignore Case, Character-Level Highlight
privacy
100% Client-Side (Safe for Production Configs & Secrets)

JSON & Code Diff Worked Example

Scenario: Comparing staging vs. production API JSON responses or `.env` configuration files without pasting secrets into a third-party cloud diff site.

Computes the Myers / LCS line-by-line and intra-line character edit distance entirely in browser memory.

Result: Instant color-coded additions (+), deletions (-), and inline character diffs.

JSON & Code Diff — Specific Questions & Answers

Why does sorting JSON keys before diffing eliminate false-positive line changes?

Under RFC 8259, JSON objects are unordered key-value collections (`{"a":1,"b":2}` is semantically identical to `{"b":2,"a":1}`), but standard line-by-line LCS diff algorithms compare raw text positions. Recursively sorting object keys in lexicographical (UTF-16 code unit) order canonicalizes both trees so the diff only reports actual value, type, or structural mutations.

Text Diff Comparison

Compare two blocks of text, source code, configuration files, or JSON payloads side-by-side or in unified diff view 100% locally in your browser. Highlights exact added, removed, and modified lines alongside inline word/character-level changes and exports standard Git-compatible unified diff patches.

How It Works
Lines A [1..N], Lines B [1..M] ──► Trim Common Prefix & Suffix in O(min(N, M))
  ──► Compute LCS Matrix DP[i][j] = (A[i] == B[j]) ? DP[i+1][j+1] + 1 : max(DP[i+1][j], DP[i][j+1])
  ──► Backtrack Edit Graph + Pair Adjacent Remove/Add Blocks for Word-Level Inline Diff

Parameters

LCS (DP Matrix)
Finds the maximal sequence of unchanged lines so minimal additions (+) and deletions (-) are reported
@@ -l,s +l,s @@
Standard GNU/Git unified diff hunk header indicating starting line numbers and line spans
Inline Tokenization
Splits modified lines on word and punctuation boundaries (`/(\s+|\b)/`) to highlight exact character edits

How to Use

  1. Paste or upload the Original Text (Left/Before) and Modified Text (Right/After), or click "Format & Sort JSON" when comparing JSON objects.
  2. Toggle normalization options (Ignore Whitespace, Ignore Case, or Show Changes Only) and switch between Split Side-by-Side or Unified View.
  3. Inspect line and inline word highlights, or click "Copy Unified Diff" / "Download .diff" to export a standard patch file.

Example

Scenario: Comparing two versions of a production `.env` or `package.json` file to audit exact dependency and environment changes before deployment.

Trims identical header/footer lines, computes the LCS edit script across changed blocks, and highlights modified version tokens inline.

Result: Immediate visual breakdown of "+3 added, -2 removed" lines without exposing private source code or secrets to an external web server.

Diff Viewing Modes & Normalization Controls Reference
Feature / Mode How It Works Best Use Case
Split View (Side-by-Side) Aligns Original (left) and Modified (right) line numbers in parallel columnsCode reviews, prose editing, and comparing config files on desktop
Unified View Interleaves `-` removals and `+` additions in a single vertical streamNarrow screens, Git commit patch inspection, and sequential reading
Format & Sort JSON Parses both inputs as JSON, recursively sorts keys alphabetically, and pretty-printsComparing API responses where key order differs but values match
Ignore Whitespace Collapses multiple spaces/tabs and trims leading/trailing line indentationComparing refactored code where indentation changed without logic edits
Export Unified Patch (.diff) Generates standard `--- a/original` / `+++ b/modified` hunk headersSharing patches via `git apply` or attaching to bug reports

Frequently Asked Questions

How does the Longest Common Subsequence (LCS) algorithm calculate line diffs?

Given two inputs of N and M lines, the LCS dynamic programming matrix computes the longest sequence of lines that appear in both files in the same relative order. Lines present only in the original text are marked as deletions (-), and lines present only in the modified text are marked as additions (+), yielding the minimal edit distance N + M - 2 × |LCS|.

How can I compare two JSON objects when their keys are in different orders?

Click the "Format & Sort JSON" button in the toolbar above the editors. The tool parses both JSON payloads, recursively sorts every object key alphabetically, and formats them with consistent 2-space indentation so only genuine value differences are highlighted.

Explore Data & Encoding

More In-Browser Converters & Tools

View all Data & Encoding tools →