Advertisement

JSON Formatter & Validator

Format, minify and validate JSON — with clear error messages when something's wrong.

Advertisement

How to Use This Tool

Paste JSON, then Format to pretty-print, Minify to compress, or Validate to check syntax.

  • Format adds two-space indentation for readability.
  • Minify strips all whitespace for storage or transmission.

Frequently Asked Questions

What makes JSON invalid?

Trailing commas, unquoted keys, single quotes, comments and mismatched brackets are the most common issues.

Why is my JSON valid but refuses to format?

Numbers like 1e10 are valid. If it still fails, check for invisible characters or copy the JSON with plain text paste.

Is my JSON sent anywhere?

No. Parsing happens entirely in your browser.

Does it support large JSON files?

Yes, within your browser's memory limits — usually several megabytes.

Practical Example

Paste minified JSON and press Format:

{"name":"OmniCalcs","free":true}

The pretty-printed output uses two-space indentation:

{
  "name": "OmniCalcs",
  "free": true
}
  • The same data, but each key is on its own line, making it easy to read and diff.

What Your Results Mean

  • Valid — the text parses as a well-formed JSON value, so any API or library will accept it.
  • Error message — invalid JSON reports the exact position and reason, such as a trailing comma or missing quote.
  • Formatted output — the same data re-serialized with indentation; only whitespace changes, never the values.
  • Minified output — whitespace stripped entirely for storage or transmission.

Trusted Sources

Advertisement