MultiConvers

JSON Formatter & Validator

Paste JSON to pretty-print it, minify it, or check that it parses. Invalid input shows a clear error instead of breaking the page.

How to use

  1. Paste or type JSON into the input.
  2. Choose Format to indent, Minify to collapse whitespace, or Validate to check the text as-is.
  3. If parsing fails, use the line and column in the error to find the problem.
  4. Copy the formatted or minified result when you need it.

How it works

JSON.parse reads the text. If it succeeds, JSON.stringify can reprint the value with 2- or 4-space indent (pretty-print / beautify), or as a single line (minify). Validate leaves the text as you pasted it and reports that it parsed.

SyntaxError messages from the engine often include a character position; the page turns that into an approximate line and column. Very large pastes are rejected so formatting does not freeze the tab. Nothing is uploaded.

Formula

pretty = JSON.stringify(JSON.parse(text), null, indent)
minify = JSON.stringify(JSON.parse(text))
validate = JSON.parse(text) succeeds

Worked examples

  • Object, pretty-print

    {"name":"Ada","ok":true} { "name": "Ada", "ok": true }

  • Array, minify

    [ 1, 2, 3 ] [1,2,3]

  • Invalid JSON

    {"name": "Ada",} Parse error near the trailing comma (line and column shown)

Useful notes

  • Trailing commas and comments are not JSON and will fail validation.
  • Input over 500,000 characters is rejected on purpose.
  • The text stays in your browser. It is not sent to analytics.

FAQ

Can I format and validate on the same page?

Yes. Use Format, Minify or Validate. Invalid JSON shows a parse error instead of a result.

Read more: How to format JSON

What does pretty-print mean?

The same JSON value reprinted with indentation and line breaks so a person can read it. Minify does the opposite.

Read more: JSON pretty print

How do I tell if JSON is valid?

Use Validate. If JSON.parse succeeds, the text is valid JSON. A trailing comma or comment will fail.

Read more: How to validate JSON

Is my JSON uploaded?

No. Parsing runs in your browser. The text is not sent to analytics.

Why is there a size limit?

Huge documents can lock the tab while they parse and reprint. The limit keeps the page usable.

Do you support JSON5 or comments?

No. Only standard JSON.

Guides

Related tools

See all Utilities tools.