Developer · Format · validate · inspect

JSON Formatter

Paste anything JSON-shaped

Indented, validated and collapsible, with the exact line and column of the first error if there is one.

ValidateMinifySort keysCollapse
Max size
25 MB
Parse
4 ms
Uploaded
0 B

JSON Formatter

Runs in your browser · nothing uploaded
Input
Output
Status
—
Nodes
0
Depth
0
Size
0 B

01 — How to use JSON Formatter

1 Paste your JSON Drop in a raw API response, a config file, a log line — anything JSON-shaped. Formatting runs as you type, so there is no separate "load" step.
2 Choose an action Format for a readable, indented layout; Minify to strip it down to the smallest valid representation; Sort keys to normalise property order for diffing.
3 Read the stats foot Status confirms the document parsed cleanly, or points at the first problem. Nodes and depth give a quick sense of size and nesting; size shows the formatted byte count.
4 Copy or download Copy the formatted output straight to the clipboard. Nothing is sent anywhere first — the text in the output pane is exactly what gets copied.

02 — Getting good results

Sort keys before diffing two payloads Two API responses that are semantically identical can still fail a text diff if their keys were serialised in a different order. Sort keys first and the diff will only show real differences.
Minify only at the network boundary Minified JSON is smaller to transmit but harder to read. Keep source files and config indented for humans, and minify only the copy that actually goes over the wire or into a build artifact.
Watch the depth counter on deeply nested payloads A depth in the double digits is a signal worth noticing — deeply nested JSON is a common cause of slow parsing, awkward TypeScript types, and bugs in code that walks the tree recursively.
The error position points at the actual problem A syntax error is reported at the exact character that broke the parse, not at the start of the document. If it lands right after a value, the most common cause is a missing comma before it.

03 — Questions

No. Parsing, formatting and validation all happen in your browser using JSON.parse and JSON.stringify. There is no server component to this tool, so nothing you paste ever leaves your device.

04 — More about JSON Formatter

61 more tools
where this came from.

Same shell, same shortcuts, same promise: nothing leaves your browser.

Browse all 62