We use cookies and similar technologies to enhance your browsing experience, analyze site traffic, and personalize content and ads. By clicking "Accept", you consent to our use of cookies. Learn more in our Privacy Policy.
by Cosmovex
Format, beautify, minify, validate, view as tree, diff, and convert JSON instantly. Auto-fix broken JSON. Query with JSONPath. No signup required. 100% client-side.
This is a free, in-browser tool for formatting, validating, and exploring JSON. Paste raw JSON, drop a file, or type directly, and it pretty-prints with consistent indentation, reports the first syntax error with a line and column, and lets you read the data in a collapsible tree, a flat table, or the raw text view. It also auto-fixes common mistakes like trailing commas and converts valid JSON to YAML.
Everything runs locally in your browser. The JSON you paste is parsed and rendered on your own machine and is never uploaded to a server, which matters when the payload is an API response, a config file, or a log line that contains tokens, keys, or personal data. There is no account, no upload step, and no size quota beyond what your browser's memory allows, so you can work with production payloads without worrying about where they end up.
Paste or open a JSON document and the tool parses it immediately. If it's valid, you can switch between three views:
You choose the indentation (2 spaces, 4 spaces, or tabs) and can minify to a single line for sending over the wire. Validation runs as you edit: when parsing fails, you get the reason and the position of the error rather than a generic "invalid JSON" message, so you can jump straight to the offending character.
Suppose an API hands you this, all on one line with a stray comma:
{"user":{"id":42,"name":"Ada","roles":["admin","editor",]},"active":true}
Strict JSON rejects the trailing comma after "editor". The auto-fix step removes it, and formatting with 2-space indentation gives you:
{
"user": {
"id": 42,
"name": "Ada",
"roles": [
"admin",
"editor"
]
},
"active": true
}
Now the tree view shows user as an expandable node and roles as a three-item array, and the YAML conversion produces a flatter, comment-friendly version of the same data. The original input never left the page.
package.json, tsconfig.json, app manifests, and CI configs are JSON. Formatting normalises indentation before you commit so diffs stay clean.A few things that trip people up:
{name: "Ada"} is a JavaScript object, not JSON. Keys need "name".// or /* */. If your config uses them (some tools accept "JSONC"), strip them before validating.NaN, Infinity, and undefined are invalid. Use null or a number.JSON is a deliberately small subset of JavaScript's object syntax, defined so that any compliant parser in any language accepts exactly the same documents. That strictness is the point: by banning trailing commas, comments, single quotes, and unquoted keys, the grammar stays unambiguous and easy to implement, which is why JSON works the same in a browser, a Go service, and a Postgres column.
The value types are also fixed: an object ({}), an array ([]), a string, a number, true, false, or null. Notably there is no date type, so dates travel as strings (commonly ISO 8601, like "2026-06-02T10:30:00Z") and your code reparses them. Numbers have no explicit integer/float distinction in the spec, and very large integers can lose precision once they exceed what a 64-bit float represents, which is why IDs are often sent as strings.
No. Parsing, formatting, and conversion all run in your browser. The data you paste stays on your machine, so it's safe to use with API responses or configs that contain secrets.
JavaScript object literals allow trailing commas, unquoted keys, single quotes, and comments; strict JSON allows none of those. The auto-fix can clear trailing commas, but the other cases need manual edits.
It removes common syntax mistakes such as trailing commas before a closing brace or bracket so the document parses, without altering any of your values.
Format it, then open the tree view and expand only the branches you care about. Collapsed nodes keep the rest of the document out of your way.
Yes, within your browser's available memory. If the tree or table view feels slow on a very large array, switch to raw view, which renders the text without building interactive nodes.
Strings, numbers, booleans, and null map directly to their YAML equivalents, and nested objects and arrays become indented YAML blocks. The result is equivalent data in a format that also supports comments.
JSON numbers are typically parsed as 64-bit floats, which can't represent every integer above roughly 9 quadrillion exactly. Send such IDs as quoted strings to keep them intact.
Standard JSON has no comments, so a document with // or /* */ will fail validation. Remove them, or strip them first if your source format allows them.