Developer/Text

JSON Formatter

Format, validate, and minify JSON instantly in your browser.

'Format' to pretty-print, 'Minify' to one line. All processing happens only in your browser.

What can it do?

'Format' pretty-prints JSON with 2-space indentation and, if there's a syntax error, tells you what's wrong. 'Minify' removes whitespace into one line to reduce transfer size. All processing uses the standard JSON parser, entirely in your browser.

When to use it

  • Inspect API responses: format a one-line response to grasp its structure at a glance.
  • Validate syntax: quickly find missing commas or quote errors in JSON.
  • Optimize size: minify a config file or payload to shrink it.

Things to note

  • Only standard JSON is supported; comments (//) and trailing commas are treated as errors.
  • Very large JSON can use a lot of browser memory.
  • Format and minify change only the layout, not the data values.
Is my data safe?

The JSON you enter is processed only in your browser and is never sent to or stored on a server. You can safely paste JSON with sensitive data.

Read the Privacy Policy

Frequently asked questions

Is my JSON sent to a server?

No. Formatting, validation, and minifying all use the browser's standard JSON parser, and your data is never sent to or stored on a server. Even sensitive data stays safe.

How do I see error messages?

When you press 'Format' and there's a syntax error, the location and cause are shown in red. Common causes are a trailing comma, missing double quotes, or mismatched braces.

Does it accept JSON with comments?

Standard JSON doesn't allow comments, so they're treated as errors. Remove comments (//, /* */) and trailing commas first.