About this JSON Formatter & Beautifier
The left box holds the JSON you can edit freely. The right side updates in the current mode as you type. If the JSON is invalid, the error appears under the input with a line and column, and the right side keeps the last valid result instead of a half-finished one.
Format shows a collapsible tree on the right, indented with two spaces. Minify shows one colored line. XML, YAML, TypeScript, Go, and Java appear as plain text. Copy takes whatever you currently see on the right: the tree as text, the one-line version, or the converted text.
For invalid paste, use JSON repair & validate first, then return here. Compare two bodies with JSON compare; switch formats via YAML to JSON or XML ↔ JSON; mock data with JSON generator; spreadsheets with JSON to CSV.
JSON formatting essentials
Pretty print vs minify
Pretty print adds indentation and line breaks without changing the data—easier to read and debug. Minify strips whitespace into one line, which is smaller and common in logs or Network panel copies. Both forms represent the same JSON.
What counts as valid standard JSON
- Keys and string values must use double quotes, not single quotes.
- No // or /* */ comments, and no trailing comma after the last item in an object or array.
- Types are limited to objects {}, arrays [], strings, numbers, true, false, and null.
- NaN, Infinity, and undefined are not standard JSON. For comments, JSON5-style paste, or messy API text, use JSON repair & validate first.
null, true, false vs quoted strings
In JSON, null, true, and false are literals—do not wrap them in quotes. "null", "true", and "false" are strings with those characters. Numbers are unquoted too; "123" and 123 are different types. Misreading quotes when you compare API docs or exports is a common source of type bugs.
Objects, arrays, and nesting
Objects are key–value maps with unique keys; arrays are ordered lists starting at index 0. API payloads often wrap lists in data, list, or items, or nest objects inside arrays. The tree indents by level; for large JSON, use Find a key or value instead of scanning the whole text.
Typical workflows
One-line API response
Paste a one-line response, click Format, expand status or data, then Copy if you need the readable text elsewhere. The values stay the same; only the spacing changes. To compare two responses, use JSON diff. To flatten nested JSON into one layer, use JSON flatten. To pull values out with a path, use JSONPath tester.
Fixture → YAML for Helm or CI
Validate with Format first, then JSON to YAML. Scan the YAML pane for array indentation before pasting into a values file—keys become nested fields, arrays become repeated list items. Starting from YAML configs, round-trip through YAML to JSON and back here.
Mock data and exports
Generate arrays with JSON generator, format here for docs or Postman. For CSV import tests, continue to JSON to CSV or CSV generator.