JSON Formatter, Validator & Minifier

Paste JSON on the left, click a button, read the formatted output on the right. Runs entirely in your browser — your data never leaves your device.

Input

0 chars

Output

What is JSON formatting?

JSON (JavaScript Object Notation) is a lightweight data-interchange format used everywhere on the modern web — APIs, configuration files, browser storage, databases. Minified JSON saves bandwidth but is nearly unreadable; formatted JSON is human-friendly but wastes bytes. A JSON formatter converts between the two forms instantly, and validates that the JSON is syntactically correct.

When to format vs minify

Format (pretty-print) when you are reading or debugging JSON by hand — inspecting an API response, comparing two configs, or writing a test fixture. Two-space indent is the most common style; four-space is common in older code bases. Minify when you are sending JSON over a network, embedding it in a URL, or committing it to a place where file size matters. Minified JSON can be 30–50% smaller than pretty-printed JSON with no loss of information.

Common JSON errors

  • Trailing commas. {"a": 1,} is not valid JSON even though many languages accept it. Remove the comma after the last item in any object or array.
  • Single quotes. JSON strings and keys must use double quotes. {'name': 'bob'} is JavaScript object literal syntax, not JSON.
  • Unquoted keys. Every key must be a quoted string: {name: "bob"}{"name": "bob"}.
  • Comments. JSON does not support // or /* */ comments. If you need comments, use JSON5 or put them in a separate file.
  • Unescaped characters. Inside strings, escape double quotes as \", backslashes as \\, and control characters with their \u00XX escapes.

Privacy & offline

This formatter uses the browser's native JSON.parse and JSON.stringify. Your JSON never reaches our servers, and once the page is cached the tool works offline. No tracking, no limits, no signup.