JSON Formateur & Minifier (Pretty & Minify)
Format or minify JSON, with clear error locations. Everything runs in your browser.
Formatted or minified JSON will appear here...
Options
Advanced options
How to use (3 steps)
1. Paste
Paste JSON into the input panel.
2. Format/Minify
Click Format or Minify to generate the result.
3. Copier
Copier the output and you are done.
Shortcuts
Shortcuts work when the input has focus.Example of formatted JSON
{"name":"A","items":[1,2],"meta":{"ok":true}}
{
"items": [
1,
2
],
"meta": {
"ok": true
},
"name": "A"
}
- Ajouters indentation and line breaks for readability
- Sort keys to keep a consistent order
Remarques & terminology
What is JSON formatting?
Pretty-printing JSON adds line breaks and indentation so the structure is easy to read.
What is JSON minify?
Minifying removes whitespace to make the output as small as possible.
Common errors
Trailing commas, missing quotes, and mismatched brackets are typical. This tool shows line/column details.
Tip
Indent 2 keeps diffs smaller, while indent 4 is easier to scan. Choose based on your workflow.
FAQ: JSON formatter & minifier
I get an error
We show the line and column where the JSON is broken. If possible, the input is highlighted and you can jump directly to it.
Can I use JSON with comments (JSONC/JSON5)?
Standard JSON does not allow comments. Turn on “Strip comments before parsing” if needed (not fully compatible).
Large JSON is slow
Parsing and formatting run in a Web Worker to keep input responsive. Tree view is disabled automatically for large inputs.
Is my data sent anywhere?
Non. Formatting, minifying, and validation run entirely in your browser.
I see \uXXXX escapes
Toggle “Unicode escape” to control whether the output uses escape sequences.