/ developer & network toolbox
← all tools

$ json

runs locally

JSON Formatter

Pretty-print, minify and validate JSON, entirely in your browser.

json — invoker.tools

Parsed and re-serialised locally with JSON.parse.

About the JSON Formatter

The JSON tool formats, minifies and validates JSON entirely in your browser. Paste raw or messy JSON to pretty-print it with clean indentation, or minify it into a single compact line to shrink payloads. When the input is invalid, it shows a parse error message so you can spot the problem fast.

Reach for it when you copy an API response, log line or config snippet and need it readable, or when you want to confirm a string is valid JSON before shipping it. Everything runs locally in the browser, so you can safely paste sensitive data without it leaving your machine.

How to use it

  1. Paste or type your JSON into the input box.
  2. Click Format to pretty-print it with indentation, or Minify to compact it.
  3. Read the parse error message if the JSON is invalid and fix the highlighted issue.
  4. Copy the formatted or minified result for use elsewhere.

Examples

  • Input {"a":1,"b":[2,3]} becomes pretty-printed with each key and array element on its own indented line.
  • Minify a multi-line config file down to one line to embed in an environment variable.
  • Paste a trailing-comma mistake and get an immediate parse error pointing to the invalid syntax.

Frequently asked questions

What does this JSON tool do?

It pretty-prints, minifies and validates JSON. Formatting adds readable indentation, minifying removes whitespace, and validation reports a parse error when the JSON is malformed.

Is my JSON sent to a server?

No. All parsing and formatting happens locally in your browser, so nothing you paste is uploaded or stored anywhere.

Why does it say my JSON is invalid?

Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, or missing brackets. The parse error message describes what went wrong so you can fix it.

What is the difference between formatting and minifying?

Formatting (beautifying) expands JSON with indentation for readability, while minifying strips all unnecessary whitespace to produce the smallest possible single-line output.

Can I format very large JSON files?

Yes, within your browser's memory limits. Because processing is client-side, performance depends on your device rather than a server, but typical API responses and config files work fine.

Does it support JSON5 or comments?

No. It validates standard JSON only, so comments, trailing commas and unquoted keys are reported as errors rather than accepted.

More encode / decode tools