Skip to content

← All tools

JSON Validator

Paste JSON below to check whether it's valid and pretty-print it. Everything runs locally in your browser — nothing is uploaded.

New to this? Read the JSON Validator guide →

Output
Formatted JSON will appear here.

Paste some JSON and press Validate & format.

How to use the JSON validator

  1. Paste or type your JSON into the input box (or press Load sample to see an example).
  2. Press Validate & format. If the JSON is valid, the output pane shows it re-indented; if not, the status line names the first error and where it is.
  3. Pick your indentation (2 spaces, 4 spaces or a tab) and press Copy to grab the formatted result.

Everything happens in your browser using the built-in JSON.parse, so even large or sensitive payloads (API responses, config files, tokens) never leave your device.

What makes JSON valid

JSON looks like a JavaScript object literal but the rules are stricter. Valid JSON requires all of the following:

Errors it catches, with fixes

When to reach for it

Use it to debug an API response that your code rejects, to pretty-print a minified blob so you can read it, to sanity-check a hand-edited config or package.json before committing, or to confirm that data copied from a log is well-formed. If a parse error has you stuck, the error position points straight at the character that broke it.

Where you'd use this

The first thing to reach for when an API returns "unexpected token" and no line number. A validator points at the exact character, which is usually a trailing comma, a single quote, or an unescaped newline inside a string.

For example: A webhook payload is rejected by your endpoint. The validator flags position 412: a trailing comma after the last element of an array — legal in JavaScript, illegal in JSON, and invisible when you are scanning 400 lines by eye.

Frequently asked questions

What does the JSON validator check?

It parses your JSON and reports the first syntax error with its location — missing or trailing commas, unquoted keys, mismatched brackets and similar. Valid JSON is also pretty-printed.

What is the difference between validating and formatting?

Validating confirms your JSON is syntactically correct; formatting re-indents it for readability. This tool does both — it flags errors and formats valid input.

Is my JSON uploaded?

No. Parsing and formatting happen locally in your browser, so you can safely paste sensitive payloads.

Related reading

Related tools