JSON Formatter
format, validate and minify

Paste JSON to pretty-print it, check that it is valid, or minify it. Errors point to the line and column. Your data stays in your browser.

  • Free
  • No sign-up
  • Line and column of errors
  • Sort keys
  • Never leaves your browser

Runs entirely in your browser — nothing you enter is sent to us.

How it works

How to use the JSON Formatter

  1. Paste your JSON

    Paste an API response, a config file or any JSON text.

  2. Format or minify

    Choose the indentation, optionally sort keys, or minify to a single line.

  3. Copy or fix

    Copy the result, or jump to the reported line to fix a syntax error.

FAQ

JSON Formatter: questions and answers

Something else? Ask us.

Is my JSON sent to a server?

No. Formatting and validation run in your browser with its built-in JSON parser, so tokens and private data in the JSON stay on your computer.

Why is my JSON invalid?

The usual causes are a trailing comma, single quotes instead of double quotes, keys without quotes, comments, or unescaped line breaks inside strings. The error message shows where the parser stopped.

What does minifying JSON do?

It removes all spaces and line breaks that are not inside strings, making the JSON smaller to send or store without changing its data.

Need a short link too?

Letlink turns long URLs into short, branded links with click analytics. Free to start, no card needed.

Last updated by the Letlink team.