JSON Formatter and Validator

Pretty-print messy or minified JSON and find errors with line and column details.

Runs in your browser Free
Indent
Processed locally in your browser.

Make JSON readable

API responses, logs and config files often arrive as JSON squeezed onto one line. The JSON Formatter re-indents the data so its hierarchy is obvious, letting you inspect nested objects and arrays in seconds.

Validation and error finding

When you paste invalid JSON, the tool reports exactly which line and column the problem is on. Missing commas, trailing commas, single quotes and unclosed brackets are found quickly.

Indentation options

Choose 2 spaces, 4 spaces or tabs. Parsing happens entirely in your browser, so you can safely format API responses containing tokens, customer data or other secrets.

How to use JSON Formatter and Validator

  1. Paste your JSON into the input.
  2. Choose the indentation.
  3. See the formatted JSON or the error message.
  4. Copy the result or download it as a file.

Why use this tool?

Handles the JSON tidying developers need every day without sending data anywhere.

FAQ

Is my JSON sent anywhere?

No. Parsing and formatting happen in your browser; it's safe even for API responses with secrets.

Why is JSON with single quotes invalid?

The JSON standard only allows double quotes for strings and keys. Single quotes are valid in JavaScript objects but not in JSON.

How do I minify JSON?

Use the JSON Minifier to remove whitespace.

Related tools