JSON Formatter & Validator

Pretty-print, minify and validate JSON with exact error positions.

  • Free
  • No sign-up
  • Runs in your browser
  • Developer
Use the tool

Why use it

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.

Format or minify

Pretty-print with 2 spaces, 4 spaces or tabs, or strip all whitespace for a compact payload.

Exact error positions

Invalid JSON shows the line and column of the problem, so you can fix it without guessing.

Sort keys

Order object keys alphabetically at every level to make two documents easy to diff.

  1. 01

    Paste or type JSON into the input box.

  2. 02

    Choose 2 spaces, 4 spaces or tabs, and optionally sort keys alphabetically.

  3. 03

    Select Format to pretty-print or Minify to remove whitespace.

  4. 04

    If the JSON is invalid, the error shows the line and column; fix it and format again.

  5. 05

    Copy the result with one click.

Who it’s for

Typical situations where this tool saves time.

  • Headless WordPress developersRead REST API responses and check the fields your frontend needs.
  • E-commerce developersInspect WooCommerce and Shopify webhook payloads while debugging integrations.
  • Anyone editing configValidate package.json, theme settings or API config files before deploying.

Questions

Short answers about privacy, limits and how the tool works.

Is my JSON sent to a server?

No. Formatting and validation happen in your browser with the built-in JSON parser, so the data never leaves your device.

Why does valid JavaScript fail as JSON?

JSON is stricter than JavaScript: keys and strings need double quotes, trailing commas aren't allowed, and comments, undefined and NaN aren't valid.

What does sorting keys do?

It orders object keys alphabetically at every level, which makes two JSON documents much easier to compare in a diff.

Need a tool like this inside your product?

I build custom calculators, admin utilities and integrations for WordPress, Laravel and Next.js teams.

↑ ↓ to move, Enter to open, Esc to close

Keyboard shortcuts

Ctrl+K
Search tools, articles and projects
/
Search
[
Previous lesson (on articles)
]
Next lesson (on articles)
T
Switch light / dark theme
GthenH
Go to the home page
GthenT
Go to the tools
GthenA
Go to the articles
?
Show this list