Format, beautify or minify JSON in your browser. Keeps key order unless you sort keys, rejects duplicate keys, and points to the first syntax error.
Runs in your browser — your input is processed on this device and never uploaded.
JSON to format. Maximum 8 MiB. Duplicate object keys are rejected.
Results appear here.
A JSON formatter, also called a JSON beautifier or pretty printer, rewrites JSON with line breaks and indentation so a person can read it. JSON itself is a text format for objects, arrays, strings, numbers, booleans and null. Parsers ignore extra whitespace, so APIs often send everything on one long line, and a missing comma hides in the noise.
This tool pretty-prints or minifies JSON in your browser. Paste a document of up to 8 MiB.
Minified JSON is fine on the wire and painful to review. You cannot see the nesting, you cannot tell which closing brace belongs where, and a truncated paste looks like valid JSON until something downstream fails.
Pretty-print with a stable indent and you can read the shape, copy a field, or drop the result into a diff. Minify again when you need the compact form for a request body or a config value.
Sorting keys is a separate job. Two objects that differ only in key order are equal to most programs and unequal in a text diff. Sorting makes the text match. It is not a cryptographic canonical form.
JSON Validator on ToolkitBay is the sibling when you only need a yes or no plus a caret under the first syntax error. It uses the same parser. YAML Formatter and Validator takes the same JSON and gives it back as YAML.
jq, Python's json.tool and the format command in most editors do this work locally. Reach for those when the file is already on disk or part of a script. This page is for the JSON on your clipboard right now.
It does not check data against a JSON Schema. It only checks that the text is JSON.
RFC 8259 allows duplicate keys, and most libraries keep the last value without telling you. That hides mistakes such as a field pasted twice, so this tool treats a duplicate as an error.
Key order follows the input unless you ask to sort. Sorted order is plain Unicode code-point order of the key strings, not the RFC 8785 JSON Canonicalization Scheme. Do not use the output as a signing input just because the keys came out sorted.
Formatting runs in your browser. The JSON is not sent to ToolkitBay's servers.
Find similar tools by category or tag.