Format or minify
Pretty-print with 2 spaces, 4 spaces or tabs, or strip all whitespace for a compact payload.
Pretty-print, minify and validate JSON with exact error positions.
Loading tool…
Paste JSON from an API response, a config file or a WordPress REST endpoint to format it, check it's valid and see exactly where a syntax error is. Useful when debugging headless WordPress, WooCommerce webhooks or Shopify theme settings.
Pretty-print with 2 spaces, 4 spaces or tabs, or strip all whitespace for a compact payload.
Invalid JSON shows the line and column of the problem, so you can fix it without guessing.
Order object keys alphabetically at every level to make two documents easy to diff.
5 quick steps. Going deeper? Read Headless WordPress with Next.js App Router: a production architecture guide.
Paste or type JSON into the input box.
Choose 2 spaces, 4 spaces or tabs, and optionally sort keys alphabetically.
Select Format to pretty-print or Minify to remove whitespace.
If the JSON is invalid, the error shows the line and column; fix it and format again.
Copy the result with one click.
Typical situations where this tool saves time.
Short answers about privacy, limits and how the tool works.
No. Formatting and validation happen in your browser with the built-in JSON parser, so the data never leaves your device.
JSON is stricter than JavaScript: keys and strings need double quotes, trailing commas aren't allowed, and comments, undefined and NaN aren't valid.
It orders object keys alphabetically at every level, which makes two JSON documents much easier to compare in a diff.
I build custom calculators, admin utilities and integrations for WordPress, Laravel and Next.js teams.
Valid JSON
{
"id": 42,
"slug": "hello-world",
"title": {
"rendered": "Hello world"
},
"categories": [
3,
7
],
"meta": {
"featured": true
}
}