§

Paste the JSON you want to format, validate, or minify.

Parsing, validation, and formatting all run in your browser using the native JSON parser.
§

Validation

Paste or type JSON to validate.
§

Output

text

Formatting and validating JSON underpins almost every US developer workflow: GraphQL responses returned by Apollo or Relay, AWS CloudFormation templates authored in JSON form, IAM policy documents, GitHub Actions workflow outputs piped through `jq`, and the dbt manifest that Snowflake or BigQuery teams check into source control. UK fintech teams building toward Open Banking Read/Write API conformance regularly pretty-print the JWS-signed JSON payloads exchanged with TPPs. This formatter accepts pasted text, validates strict RFC 8259, and pinpoints the line and column where parsing fails — all inside the browser, so proprietary payloads never reach a hosted prettifier.

What is JSON formatting?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format defined by RFC 8259 and ECMA-404. A JSON document is a tree of six value types — object, array, string, number, boolean, and null. Formatting adds whitespace so humans can read that tree; minifying removes the whitespace so machines can move it faster over the wire.

How does JSON formatting work?

Your input is processed entirely in your browser using the built-in JSON.parse and JSON.stringify functions. The high-level steps are:

  1. Your input is read from the textarea and stripped of leading and trailing whitespace.
  2. The browser parses it with JSON.parse. If the input is not valid JSON, the parser throws a SyntaxError that is caught and surfaced with the line and column where it stopped.
  3. When the input is valid, the parsed value is re-emitted with JSON.stringify(value, null, indent), where indent is the spacing you selected (2 spaces, 4 spaces, or a tab character).
  4. For minification, JSON.stringify(value) is called without an indent argument, producing the shortest valid form of the same value with no insignificant whitespace.
  5. Output is written to the readonly textarea, and a status panel reports either Valid JSON or the exact parse error so you can fix the source.

Why format JSON with this tool?

  • Privacy: every parse, format, and minify pass happens in your browser. The JSON never reaches our servers.
  • Immediate validation: misplaced commas, unquoted keys, single quotes, and trailing commas are reported with a precise line and column hint so you can jump straight to the bug.
  • Review-ready output: pretty-printed JSON with consistent indentation produces clean code-review diffs and readable configuration files.
  • Production-ready minification: stripping insignificant whitespace shrinks API payloads, manifest files, and embedded fixtures before you ship them.

What are common applications of JSON formatting?

Reading and writing JSON shows up across web development and tooling:

  • Debugging APIs: pasting a raw response from curl or the network panel to confirm shape, find a typo in a key, or spot a missing closing brace.
  • Cleaning up configs: re-indenting hand-edited package.json, tsconfig.json, or CI manifests so they pass review and linters.
  • Reading logs: re-formatting compact application/json log lines so each field lines up under the next, then minifying again before pasting into a ticket.

What does a JSON formatting example look like?

Pasting {"id":42,"name":"Ada Lovelace","email":"ada@example.com","roles":["admin","engineer"]} and pressing FORMAT with a 2-space indent expands it across nine lines, with each object field and each array entry on its own line. Pressing MINIFY on the formatted text collapses it back to the same compact string, byte for byte.

This JSON formatter parses with the same engine your Node.js, Deno, or browser runtime uses and emits output you can paste straight into code, configs, or logs.