Tools / JSON Formatter

JSON Formatter

Validate, format, minify and explore JSON in a searchable tree. Keep every number precise.

Local processing · UTF-8 files · input up to 1 MiB · nesting up to 128 levels. Nothing you enter is uploaded.

Result

Your result will appear here after processing.

How do I format JSON?

Paste JSON or choose a UTF-8 JSON file. Format JSON validates the input and indents it with two spaces. Minify JSON removes whitespace outside strings. Copy or download the result.

Will large numbers change?

Number tokens are preserved exactly, including integers beyond JavaScript’s safe integer range, exponents and decimal notation. The formatter does not parse and reserialize numbers.

Can I explore JSON as a tree?

After formatting or minifying, expand objects and arrays in Tree view, or search keys and values. Each branch shows 50 items per page and search shows the first 100 matches. Values retain their original number notation.

What counts as invalid JSON?

Comments, trailing commas, duplicate object keys and incomplete input are rejected. Errors include a line and column. Top-level strings, numbers, booleans and null are valid JSON.

What are the limits?

Input is limited to 1 MiB, nesting to 128 levels and output to 4 MiB. JSON is processed locally and is cleared when you leave or reload this tool.