JSON formatter

Format, validate, or compact your JSON.

Keep the original if exact large-number values matter.

What formatting JSON can and cannot do

Paste text to validate JSON syntax and change its indentation in your browser. Making it readable does not verify the meaning of the data.

01

Find syntax mistakes

JSON keys and strings need double quotes, and a trailing comma after the last item is invalid. When parsing fails, check quotes, commas and brackets first, then try formatting again.

02

Preserve large integer identifiers

An integer outside the range of ordinary browser number precision may not survive parsing and re-serialization exactly. For identifiers whose digits matter, keep the original or represent them as strings.

03

Indenting versus compacting

Two- or four-space indentation helps a person read a document; compact mode removes unnecessary whitespace. Neither mode is intended to change the structure. For critical data, verify the output in the system that will consume it.

Related tools