JSONLens — Semantic JSON Diff Comparator, Formatter & Type Generation Studio

The private, client-side developer studio for comparing complex JSON trees, beautifying payloads, repairing broken syntax, and generating TypeScript/Go types. Built by Grassroot Digital.

Why Semantic JSON Diffing Beats Standard Line-by-Line Text Comparison

Standard text diff utilities (like Git diff or generic online diff sites) operate strictly on raw character lines. If two API responses contain the exact same data but have rearranged keys, differing indentation, or reordered object properties, generic text diffs produce dozens of false-positive modifications.

JSONLens normalizes the JSON Abstract Syntax Tree (AST) before comparing. It recursively inspects keys, arrays, nested objects, and scalar types, giving you an exact semantic breakdown: exactly what fields were added, what values changed, and what keys were deleted, along with statistical count indicators.

Beyond diffing, JSONLens serves as an indispensable daily developer tool with one-click Auto-Repair for malformed JSON, bidirectional JSON ↔ YAML conversion, and instant code generation for TypeScript interfaces and Go structs.

Key Capabilities & Developer Workflows

🌳 Semantic Tree Diffing

Side-by-side and unified split diff views with color badges for added properties (+), removed keys (-), and modified values (~).

🛠️ Syntax Auto-Repair Engine

Instantly fixes common JSON errors: converts single quotes to double quotes, adds missing quotes to keys, and strips trailing commas.

📐 TypeScript & Go Code Generation

Generates type-safe TypeScript interfaces and Go structs with idiomatic `json:"field"` tags directly from raw JSON payloads.

✨ Beautifier, Formatter & Minifier

Format JSON with 2-space, 4-space, or tab indentation, alphabetize object keys, or compress into a single-line minified string.

🔄 Bidirectional JSON ↔ YAML

Seamlessly convert JSON to clean YAML and vice versa for Kubernetes manifests, Docker Compose, and CI/CD configurations.

🔒 100% Client-Side Memory

Zero cloud API endpoints, zero tracking cookies. Your sensitive database dumps and API responses never leave your browser.

Frequently Asked Questions

How does JSONLens compare two JSON payloads?

JSONLens performs a semantic comparison that parses and compares objects and arrays structurally, highlighting added keys, deleted fields, and modified values with visual colored diff badges and statistical metrics, regardless of key order.

Can JSONLens automatically fix broken JSON syntax?

Yes! The Auto-Repair Syntax feature automatically detects and corrects common developer syntax errors such as trailing commas, single-quoted strings, unquoted object property names, and malformed arrays.

How does JSONLens generate TypeScript and Go types?

JSONLens parses the structural AST of your JSON object, infers precise primitive types (string, number, boolean, array, optional nested objects), and outputs clean, production-ready TypeScript interfaces or Go struct definitions with json tags.

Does JSONLens upload my data or JSON payloads to any server?

No. JSONLens executes 100% locally in your browser's memory with zero server API requests, telemetry, or third-party cookies.