Syntax supportComments, unquoted keys, single quotes, trailing commas, hex numbers and more. Formatting reflows tokens, so comments survive verbatim (toggleable).
JSON5 sourceJSON5
Load some JSON5
Formatted outputJSON5
Load JSON5 and the result will appear here
JSON with comments, formatted

JSON5 Formatter

JSON5 / JSONC · comments preserved verbatim · pick your indent · runs locally

🔒Processed locally in your browser — never uploaded or stored

No upload, no storage

JSON is processed in memory and never sent to a server.

Share via URL fragment

Share links encode data in the # anchor — never sent to a server.

Remember last edit

Optionally keep your last input locally; clear it with one click.

Why use the JSON5 formatter

Comments survive

Ordinary formatters choke on comments or throw them away; this one reflows tokens so line, trailing and block comments stay exactly where they belong.

Full JSON5 syntax

Unquoted keys, single quotes, trailing commas, hex numbers and Infinity all parse and format correctly.

Your style stays yours

Only indentation and line breaks change — quote style and number notation are kept as written.

Tidy as you go

Trailing commas are normalized away, and a switch strips all comments when you want clean output.

Local · no upload

Config files format entirely in your browser; nothing is uploaded or stored.