ToolUniverse

JSON Toolkit

Format, validate, minify, escape, and explore JSON online — instantly, for free.

All formatting, validation, and analysis happens locally in your browser — nothing you paste here is uploaded or logged.
Try a sample:
Indent:
Input
$
Output
$

Frequently asked questions

Is my JSON uploaded anywhere?
No. All formatting, validation, minification, and tree exploration happen entirely in your browser — nothing is sent to a server.
Why does it say my JSON is invalid?
The validator reports the exact parse error, usually a missing comma, an unquoted key, or a trailing comma — check the position mentioned in the error message.
Does formatting change the data?
No — formatting and minifying only change whitespace. Key order and values are preserved exactly, unless you enable Sort Keys.
What does the duplicate-key warning mean?
JSON allows the same key to appear more than once in an object, but only the last value survives when it's parsed — the warning shows you exactly which keys are affected so you can fix the source.
What's the difference between Escape and Format?
Format pretty-prints a full JSON document. Escape converts a plain string into the escaped form you'd use to embed it inside a JSON string value or source code — for example turning a literal quote into \".
Why doesn't JSON support comments?
The JSON specification (RFC 8259) intentionally omits comments to keep the format unambiguous and simple to parse across every language and platform — a comment copied from JavaScript or JSON5 will fail to parse here exactly as it would in any standards-compliant JSON parser.
Why does 1 look the same as 1.0 after formatting?
JSON has a single numeric type with no built-in distinction between integers and floats — once a value is parsed as a number, the original literal formatting isn't preserved. If that distinction matters for your use case, keep the value as a string instead.
Can this handle very large JSON payloads?
Yes, though very large or very deeply nested payloads may take a moment to parse and render in the Tree view, since rendering happens on the main thread in your browser rather than a server with dedicated resources.

You might also need

What is the JSON Toolkit?

The JSON Toolkit cleans up messy or minified JSON so it's easy to read, checks that it's syntactically valid, and helps you explore it. Paste any JSON payload — an API response, a config file, a log line — and format it with proper indentation, minify it back down for production, escape or unescape it for embedding in code or config, browse it as a collapsible tree, or inspect duplicate-key and structural statistics. JSON's grammar is small, but the ways real payloads break it are not: a trailing comma copied from JavaScript object literals, an unquoted key, a stray comment (which JSON doesn't support at all), or mismatched brackets several hundred lines deep. Rather than guessing, this tool surfaces the exact parse error and position so you can jump straight to the problem instead of scanning the whole document by eye. Because JSON has no comments and no way to distinguish 1 from 1.0 once parsed, formatting and minifying here only ever touch whitespace — key order and values are preserved exactly, so round-tripping a payload through Format and then Minify always gets you back to logically identical JSON, byte-for-byte where it matters. The Tree view is useful for exactly the case a formatted text view isn't: jumping to a specific nested field in a large payload without scrolling past everything else, and the Statistics tab gives a fast sense of how large and how deep a payload actually is before you commit to processing it elsewhere.

Use cases

  • Debugging an API response by pretty-printing it into a readable structure
  • Validating a config file before deploying it
  • Minifying JSON to reduce payload size before sending it over the network
  • Escaping a JSON string so it can be embedded safely inside another JSON document or source code
  • Exploring a deeply nested payload as a collapsible tree instead of scrolling through raw text
  • Catching duplicate keys that would otherwise silently overwrite each other when parsed
  • Checking the exact line and column of a syntax error before opening the file in an editor
  • Converting a formatted payload to Base64 for embedding elsewhere via the built-in handoff to the Base64 Encoder

How to use the JSON Toolkit

  1. 1

    Paste your JSON

    Paste or type JSON into the input panel, or load one of the sample payloads.

  2. 2

    Choose an action

    Click Format to pretty-print, Minify to compress, Validate to check syntax, or Escape/Unescape to convert a string.

  3. 3

    Explore the result

    Switch between the Code, Tree, and Statistics tabs to view the output, browse it structurally, or see key/node/depth counts.

  4. 4

    Copy or send it onward

    Use the Copy button (or Ctrl/Cmd+Shift+C), or send the output straight to the Base64 Encoder.

Examples

Minified to formatted

{"name":"Ada","active":true,"roles":["admin","user"]}
{
  "name": "Ada",
  "active": true,
  "roles": [
    "admin",
    "user"
  ]
}

Formatted to minified

{
  "id": 1,
  "tags": ["a", "b"]
}
{"id":1,"tags":["a","b"]}

Escaping a string for embedding

He said "hi"
line two
He said \"hi\"\nline two

We use cookies for analytics and ads. Choose whether to allow them.