1001Ferramentas
{} Dev

JSON Formatter

Format, validate and minify JSON online. Paste raw JSON and get a readable, indented version.

How to use?

Paste the JSON into the left field. Use Format to indent it, or Minify when you want it compacted. Any syntax error gets flagged in red by the validator.

Format and validate JSON instantly

JSON is the lingua franca of APIs, yet on a single line with no spaces it turns into an unreadable blob. This formatter takes raw JSON and hands back an indented, organised version where you can see the structure, the nesting and every key in place. Far easier to read and debug.

It doesn't just prettify, it validates too. If there's a stray comma, a missing quote or a badly closed brace, the error gets flagged so you can fix it. Need the reverse? You can minify, stripping spaces and line breaks to make the JSON compact before sending it.

All processing runs in the browser, so your JSON (even with sensitive data) never leaves your device or lands on any server.

Frequently asked questions

Does the formatter accept JSON with comments or a trailing comma?
No. Validation runs on the browser native parser, which follows RFC 8259 strictly: double-slash comments, a comma after the last item, unquoted keys and single quotes are all rejected, so JSON5 and JSONC files will not pass. When parsing fails, the message comes straight from the browser engine and points at the exact offset of the offending character.
Why did the key order change after formatting?
The text is parsed into an object and serialised back, and JavaScript reorders keys that look like whole numbers, listing them in ascending order ahead of the rest. An object with keys 10, 2 and name comes out as 2, 10 and name. Repeated keys collapse as well: when the same key appears twice, only the last value survives, with no warning.
Do large ID numbers lose digits when they go through the formatter?
Yes, and it is worth checking before you ship the output. Every number becomes a double-precision float, so integers above 9,007,199,254,740,991 get rounded: 12345678901234567890 comes back as 12345678901234567000. Trailing zeros vanish too and 1.0 turns into 1. If the field is an identifier, carry it as a quoted string to keep it intact.

Related Tools