Developer Tools

JSON Formatter

Prettify messy JSON with consistent indentation, minify JSON to reduce size, or validate JSON syntax.

JSON Input
Output
About this tool

JSON (JavaScript Object Notation) is the dominant data interchange format for web APIs and configuration files. Formatted JSON with consistent indentation is easy to read and debug. Minified JSON removes all whitespace to reduce file size and bandwidth. Both are valid JSON — only whitespace differs. Validating JSON catches syntax errors like missing commas, unquoted keys, or trailing commas that would cause parsing failures.

Common JSON errors

Trailing commas (a comma after the last item in an array or object) are not valid JSON even though JavaScript allows them. Single quotes instead of double quotes around strings are a frequent mistake. Keys must be quoted strings in JSON — unlike JavaScript objects where bare key names work. Comments are not allowed in JSON.

Frequently asked questions

What is the difference between JSON and JSONP?

JSONP (JSON with Padding) is an older technique for working around browser same-origin policy restrictions. It wraps JSON in a function call. Modern APIs use CORS instead. JSONP is largely obsolete.

Related tools