JSON Formatter
Format, minify, and validate JSON in your browser. Precise error reporting with line and column numbers. No data leaves your device.
About this tool
This is a strict JSON formatter. It parses your input using the browser’s built-in JSON engine, then re-emits it with consistent indentation — or collapses it to a single line for minification. Errors are reported with line and column when the engine makes that information available.
Use Format when you want to read or diff JSON. Use Minify when you need to ship it over the wire and every byte costs. Use Validate to confirm well-formedness without changing the output. The most common JSON mistakes are trailing commas, single-quoted strings, unquoted keys, and stray commas after the last element — all of which produce clear errors with this tool.
Because the tool is client-side only, pasting sensitive JSON (auth payloads, user records, API responses with PII) is safe. The input is kept in a URL hash when it’s small enough to encode, so you can bookmark a formatted view — but URL hashes are never transmitted in HTTP requests, so the data stays on your device.
Frequently asked questions
Is my JSON sent to your servers?
No. All parsing, formatting, and validation runs in your browser. The JSON you paste never leaves your device.
Can I format a very large JSON file?
Yes, up to your browser’s memory limits. Files in the tens of megabytes work in modern browsers; multi-hundred-megabyte payloads may freeze the tab briefly while parsing. For files that size, prefer a CLI tool like jq.
What JSON version is supported?
Strict JSON as defined by RFC 8259. Keys must be quoted, no trailing commas, no comments.
Does this handle JSON with comments (JSONC)?
No. Only strict JSON. A JSON5/JSONC formatter is planned as a separate tool.
Can I bookmark a formatted result?
Yes, for small inputs. The input is encoded into the URL hash when it’s under about 10KB. The hash stays on your device and is not sent to any server.