JSON Formatter
Paste JSON on the left. See errors, format the document, or open a collapsible tree.
Runs entirely in your browser. Your input never leaves this tab.
Input
Output
Input is too long to share by URL. Copy the output instead.
Other tools
Same site, different job. Your input stays in the browser.
What is JSON?
JSON, short for JavaScript Object Notation, is a text format for structured
data. It uses two shapes: an object with named fields, and an array with an
ordered list. Values are strings, numbers, booleans,
null, or another object or array. Most APIs on
the web return JSON.
How to use this formatter
- Paste or type JSON in the input pane.
- The output pane shows the pretty-printed version.
- Click Tree to switch to a collapsible view of keys.
- Errors appear with a red underline, a gutter icon, and a short message that names the line.
- Format pretty-prints. Minify collapses to a single line. Copy output puts the result on the clipboard.
- Use Cmd or Ctrl + Enter to format from the keyboard.
Common JSON errors
- Trailing commas after the last item are not allowed.
- All keys must be strings in double quotes.
- Single quotes are not valid in JSON. Use double quotes.
- Comments are not part of JSON. Remove them before you parse.
- A file must have exactly one top-level value, either an object or an array.
Sample JSON documents
Each link opens the formatter with the input pre-filled.
Where JSON is used
JSON is the default format for REST APIs, browser fetch responses, package manifests such as package.json, NoSQL stores like Firestore and DynamoDB, and configuration files across
many tools. Because it is text, you can read a JSON document in any editor,
diff it against another version, and share it in a chat or a bug report.
Runs in your browser
Every parse, format, and tree render happens on this page. Nothing is uploaded and nothing is stored on a server. Very large documents stay responsive because the input pane uses a virtualised editor and the tree view expands only the branches you open.