JSON Formatter

Output

How it works

Paste JSON to pretty-print it with clean indentation. Syntax errors are pointed out by line and column. Sort keys or minify to one line. Nothing leaves your browser.

How to use

Paste JSON from an API response, config file or log and press Format (Ctrl+Enter). Choose 2 spaces, 4 spaces or tabs. "Sort keys" orders object keys alphabetically, which makes two documents easy to compare. "Minify" strips all whitespace to shrink the payload.

Common JSON errors

  • Trailing commas like {"a":1,} are not allowed.
  • Single quotes {'a':1}: keys and strings need double quotes.
  • Unquoted keys {a:1}, comments (//), undefined and NaN aren't valid JSON either.

Everything runs in your browser, so JSON containing tokens or company data is never uploaded.

You might also like

Base64 & URL EncoderBase64, URL, HTML encode/decode Unix Timestamp ConverterEpoch time ↔ date