Skip to main content

JSON Formatter

Format, minify, and validate JSON online. Paste API responses or config files — all processing stays in your browser.

Format

JSON

Pretty-print, minify, and validate JSON.

Ctrl+Enter to Format

Recent Payloads

Payloads you format will appear here for quick access. Stored locally in your browser.

What this tool does

Pretty-print, minify, and validate JSON so you can inspect API responses, configs, and logs quickly.

Privacy

Your JSON never leaves this tab. Formatting and validation run entirely in your browser.

Use cases

  • Debug API responses before integrating an endpoint
  • Clean up copied JSON from logs or documentation
  • Validate configuration files before deployment

Troubleshooting

Getting Unexpected token '<', "<!DOCTYPE"… is not valid JSON? The response is an HTML page, not JSON — that guide covers how to find which one and why.

Seeing a precision warning above, or wondering why a large id came back with different digits? Valid JSON, changed value measures which runtimes keep every digit and which do not.

Python reporting Expecting property name enclosed in double quotes? That one message covers single-quoted keys, unquoted keys, and a trailing comma.

Getting Unexpected end of JSON input? The payload ended where a value was due — that guide covers when it means an empty response body and when it means a truncated one.

A trailing comma in an object reports a position; in an array it reports none — that guide covers how to find the one you were not shown.

Seeing Bad control character in string literal? A real newline or tab landed inside a quoted value — that guide covers which characters are forbidden, and why the newlines in pretty-printed JSON are fine.

Need JSON Schema validation or custom formatting rules? Suggest a feature →

Guides for this tool

  • Comments in JSONJSON has no comments, and the error never says so — a // line produces the same message as a trailing comma. What each parser does, and what JSONC and JSON5 change.
  • Trailing comma in JSONJSON forbids trailing commas, but V8 reports them two different ways. An object gives you a position, line, and column. An array gives you none of those — measured, with what to do instead.
  • Unexpected end of JSON inputIt does not only mean empty. Measured on current V8: this message appears when the input ends where a value should begin — which covers an empty body and several kinds of truncation, but not all of them.
  • Bad control character in string literalA real newline inside a JSON string is invalid; the same newline between two keys is fine. Measured across V8 and Python — which characters break, which do not, and why U+007F is allowed.
  • Expecting property name enclosed in double quotesPython raises this for single-quoted keys, unquoted keys, and a trailing comma alike — the message does not say which. How to tell them apart, and what V8 reports for the same input.
  • Valid JSON, changed valueA JSON document can parse without error and still hand you a different number. Measured across Node, Python, Go, jq, and PostgreSQL: which consumers keep every digit of a large ID, and which do not.
  • Unexpected token '<' … is not valid JSONThe parser is not the problem: your request returned an HTML page instead of JSON. How to read the V8 message, find the real response, and fix the cause.