JSON5 Formatter
Format JSON5 with comments supported
Features
Beautify JSON5
Formats JSON5 into clean indented output, preserving comments
Minify JSON5
Strips whitespace to produce compact JSON5 output
Validate JSON5
Parses and reports syntax errors specific to the JSON5 spec
Switch Input / Output
Swap editor contents with a single click
JSON5 is JSON with the rough edges smoothed out
Standard JSON is strict by design — no comments, no trailing commas, keys must be quoted. That's fine for machine-to-machine communication, but it makes config files annoying to write by hand. JSON5 relaxes those rules. You can add comments to explain why a value is set a certain way, leave a trailing comma after the last item in an array, and use unquoted keys for simple identifiers.
It's the format used under the hood by tools like Babel (babel.config.json5) and some ESLint configs.
Validate before you ship
The validate button runs a full parse of your JSON5 and reports any syntax errors. If it passes, you'll see a confirmation message. If it doesn't, you get the exact error from the JSON5 parser, which is usually precise enough to point you straight at the problem line.
Beautify and minify work the same way as the standard JSON formatter — minify strips whitespace for smaller file sizes, beautify expands it for readability.