JSON Formatter
Parsing happens live as you type, entirely in your browser; nothing you paste leaves this page.
How it works
仕組みPaste any JSON and this tool validates it the instant you type, right in your browser; nothing is uploaded anywhere. Valid input gets pretty-printed with two-space indentation (or minified with one click), along with its byte size and a count of top-level keys or array items. Invalid input shows the parser’s own error message, and when the browser reports a character position, a caret pinpoints the exact spot in an excerpt of your text. It’s the quickest way to find the trailing comma or missing quote that broke a config file or API payload.
Strict JSON forbids several things JavaScript allows: trailing commas after the last item, single quotes around strings, unquoted keys, and comments. The error excerpt with the caret usually lands right on the offending character. Fix that one spot and re-check; errors often cascade, so one fix can clear several complaints.
Pretty-printing adds line breaks and two-space indentation so humans can read the structure; minifying strips every unnecessary space so the payload is as small as possible. The data itself is identical either way. Minified JSON is what you’d ship over the network; pretty is what you’d commit to a config file.
Yes. The message text comes from each engine’s parser, so Chrome, Firefox, and Safari word the same mistake differently, and not all of them include a character position. When a position is available the tool shows the caret excerpt; when it isn’t, read the message and check the end of the last line you edited.