<
0 B UPLOADED · ALL PROCESSING RUNS LOCALLY IN THIS TAB 12 TOOLS ONLINE

Format

JSON Formatter

Paste JSON on the left. It's validated and pretty-printed on the right as you type — with the exact line and character of any syntax error, so you're not hunting for a missing comma by eye.

Input
Formatted output

      

Walkthrough

How to use it

  1. Paste or type your JSON into the input pane on the left. There's no size limit beyond what your browser can handle comfortably.
  2. The output updates automatically as you type — there's no "Format" button to click.
  3. If the JSON is valid, the right pane shows it pretty-printed with 2-space indentation.
  4. If it's invalid, the status line below shows the exact error, including the line and column where parsing failed.
  5. Click Copy to copy the formatted result to your clipboard, or Clear to start over.

Use cases

When you'd use this

Debugging an API response. Minified JSON from a network tab or a curl response is unreadable on one line. Pasting it here turns it into something you can actually scan for the field you're looking for.

Cleaning up a config file. Hand-edited JSON config files often end up with inconsistent spacing. Running them through the formatter normalizes indentation before you commit.

Validating before you ship. A trailing comma or an unquoted key will break a JSON.parse() call in production. Catching the exact error location here is faster than a stack trace.

FAQ

Common questions

Is my JSON sent anywhere?

No. Parsing and formatting happen with JavaScript's built-in JSON.parse and JSON.stringify, entirely in your browser. Nothing you paste here is transmitted, logged, or stored — closing the tab clears it completely.

Why does it say my JSON is invalid when it looks fine?

The most common causes are trailing commas (valid in JavaScript objects, not in JSON), single quotes instead of double quotes, or unquoted keys. The error message includes the character position so you can jump straight to it.

Does it support JSON5 or JSONC (with comments)?

Not currently — this tool validates against strict JSON (RFC 8259), the same standard used by JSON.parse. Comments and trailing commas will be flagged as errors, which is intentional since most JSON consumers won't accept them either.

Is there a size limit?

No hard limit is enforced, but very large payloads (multiple megabytes) may feel slower since formatting runs on the main thread. For typical API responses and config files, it's instant.

Related

Related tools