JSON Formatter & Validator

Paste or type JSON — get formatted output instantly, or minify it. Error messages show line + column. Everything runs locally.

Runs entirely in your browser. Your data never leaves your device.

Paste JSON and click Format or Minify — errors show exact line and column.

JSON Syntax Rules

Test Data

InputFormatMinify
{"a":1,"b":[2,3]}2-space indented{"a":1,"b":[2,3]}
Invalid: {"a":1,}Error: trailing comma
Invalid: {name:"x"}Error: unquoted key

Uses browser's native JSON.parse for strict validation. Last checked: September 2026.

When Not To Use This Tool

Frequently Asked Questions

Does this tool send my JSON anywhere?

No. The entire formatter, validator, and minifier runs locally in your browser using vanilla JavaScript. Your JSON is never uploaded or transmitted.

What kind of JSON errors can it detect?

We use the browser's native JSON parser, which catches everything: missing commas, trailing commas, unquoted keys, mismatched braces/brackets, unterminated strings, and invalid escape sequences. We also show the exact line and column of the error.

What indentation does the formatter use?

We use 2-space indentation (the most common style in modern APIs and config files). Minification strips all whitespace while preserving the exact data structure.

Does formatting ever change my data?

Your text is parsed with the browser’s native JSON parser and rebuilt, so valid JSON comes back functionally equivalent. Two edge cases worth knowing: duplicate keys collapse to the last value, and extremely large or high-precision numbers follow JavaScript number rules, which can round them.

What should I reach for when my data is still a CSV table?

This tool only accepts text that already is JSON. For tabular data, start with our CSV to JSON Converter, which turns CSV text into JSON right in your browser — then paste the result here to pretty-print or minify it.

Formatting is just step one: export your data as YAML with JSON to YAML, compare two payloads key by key with JSON Diff, or inspect tabular exports in the CSV Viewer before converting them.