mockstack. Ready

Paste JSON, YAML, CSV, or XML. Format, validate, and minify, convert between them, or type it as a TypeScript interface.

Input
Output
Ready Also on the menuCode BeautifierDiff CheckerBase64 Encoder

About the JSON Formatter

Updated

Formats, validates, and converts structured data, in your browser.

Every Setting

Input
Auto-Detect works out which format you pasted and says so under the pills; force JSON, YAML, CSV, or XML only when a document is ambiguous. YAML covers the whole language, anchors, merge keys, and multi-line blocks included, and a file with several documents becomes an array. CSV can be separated by commas, tabs, semicolons, or pipes, so a paste from a spreadsheet works as it is. In XML, attributes become keys starting with @, and a tag that repeats becomes an array. Parse errors point at the actual line.
Output
Pretty prints readable JSON, Minify strips it for shipping, YAML, CSV, and XML convert across formats, and TypeScript writes the type definition your payload implies. CSV gives nested objects and lists their own columns, named by path like user.name or tags.0, and Separator picks commas, semicolons (what Excel expects in much of Europe), or tabs.
View
Both panes side by side, or only the input or output when one needs the full width.
Pane Divider
Remembers your split. Double-click the bar to reset it, which also restores the automatic lean toward whichever pane you are typing in.
Indent
Two spaces, four, or tabs in the pretty output. Sort Keys alphabetizes every object, which makes two documents comparable line by line.
Open / Sample / Clear
On the input pane: Open reads a JSON, YAML, CSV, or XML file; Sample loads a small example document; Clear empties everything and starts the page fresh.
Text / Tree
How the output renders. Text is the raw result; Tree is a collapsible outline, which is how a five-level structure stays readable. Click any tree row to copy its path into your clipboard.
Copy Output / Download
Cmd+S also copies; Download saves it with the right extension for the output format.
Query
A JSONPath like $.items[*].sku pulls that part out of a big payload, live as you type. The result prints directly under the box.
Schema Check
Paste a JSON Schema and the current document is validated against it as you edit: missing required keys, wrong types, each named with its path.
Diff
Paste a second JSON and get a structural comparison against the editor: changed values, added and removed keys, ignoring formatting entirely.
Stats
Keys, depth, minified size, and gzipped size for the current payload, so you know what you are actually shipping.

Common Questions

My input will not parse. Now what?
The error names the line and what was expected there. The usual culprit is an unquoted key. Comments, single quotes, and trailing commas still parse, flagged as not strict JSON because most parsers reject them.
Is my data sent anywhere?
No. Everything parses on your machine, and the share link only carries small inputs, encoded in the link itself.

Related: Code Beautifier, Diff Checker, Base64 and URL Encoder.