Processed entirely in your browser. Your input is not uploaded.

JSON Formatter & Validator

Prettify, minify, and validate nested JSON payloads with accurate syntax error line & column highlighting.

Last updated October 5, 2026

Loading tool workspace…

Overview

Prettifies, minifies, and validates JSON. On invalid input it reports the error with the line and column where possible, so you can find a missing comma or quote fast.

It's the go-to for tidying an API response or checking that a config file is valid.

How it works

The text is parsed with JSON.parse. If it parses, the tool re-serialises it with your chosen indentation for pretty output, or with none for minified output, and reports the payload size in bytes. If parsing fails, the error message is surfaced and, when the engine provides one, the line and column are extracted and shown.

Because it round-trips through a real parser, it confirms genuine RFC 8259 validity rather than just re-indenting the text.

How to use the JSON Formatter & Validator

1

Paste JSON

Drop your raw JSON string into the editor.

2

Choose Indentation

Select 2 spaces, 4 spaces, or Minify.

3

Inspect & Copy

View formatted output or see exact line/column of syntax errors.

When to use it

  • Pretty-printing a minified API response to read it.
  • Validating a JSON config before deploying it.
  • Locating the exact spot of a syntax error.
  • Minifying JSON to shrink what you store or send.

Examples

Prettify

Input
{"name":"Ada","skills":["math","code"],"active":true}
Output
{
  "name": "Ada",
  "skills": [
    "math",
    "code"
  ],
  "active": true
}

Two-space indentation, one key per line.

Syntax error

Input
{"a": 1, "b": 2,}
Output
Error near line 1, column 16

The trailing comma before } is invalid JSON; the formatter points to it instead of guessing.

Key Features & Accuracy

Syntax Error Pointer

Pinpoints exact line and column number of missing quotes, commas, or brackets.

Payload Telemetry

Shows payload size in bytes and confirms RFC 8259 compliance.

Limitations & important notes

It validates strict JSON, so comments, trailing commas, single quotes, and unquoted keys — all common in JavaScript but not in JSON — are reported as errors.
Very large payloads are processed in browser memory and can get slow.

Frequently Asked Questions

No. All formatting and validation happens in your local browser JavaScript runtime.