JSON Formatter, Validator & Beautifier Format, validate and minify JSON
100% offline
Input69 chars · 1 lines
OutputRepaired112 chars
Repaired & format · 10 lines
{
  "name": "Anvil",
  "version": 2,
  "tags": [
    "dev",
    "tools"
  ],
  "active": true,
  "owner": null
}

About JSON Formatter, Validator & Beautifier

JSON (JavaScript Object Notation) is the most common format for APIs, config files, and data exchange. But raw JSON is often minified, deeply nested, or copied from a log where it's hard to read — and a single missing comma or quote makes it invalid.

This free JSON formatter pretty-prints, minifies, and sorts keys, validating as it goes. It also repairs "almost-JSON" automatically: single quotes, Python-style True/False/None, unquoted keys, and trailing commas are fixed into strict, valid JSON. Everything runs in your browser — your data is never uploaded.

Features

  • Format (pretty-print), minify, or sort keys alphabetically
  • Auto-repair loose JSON: single quotes, True/False/None, trailing commas, unquoted keys
  • Clear parse errors with position information
  • Handles large documents entirely offline

How to use

  1. Paste your JSON (or loose, almost-JSON) into the input pane.
  2. Pick Format, Minify, or Sort keys.
  3. Copy the valid, formatted JSON from the output — a "Repaired" badge shows when it was auto-fixed.

Frequently asked questions

Can it fix invalid JSON?

Yes — for common mistakes. It repairs single-quoted strings, Python literals (True/False/None), unquoted keys, trailing commas, and comments, then outputs strict JSON. Genuinely broken structure still reports an error.

What does "minify" do?

Minifying removes all insignificant whitespace and newlines, producing the smallest valid JSON — useful for embedding in code or reducing payload size.

What is a JSON validator?

A JSON validator parses your text against the JSON grammar and reports whether it is well-formed. This formatter validates as it parses, so if anything is wrong you get a precise error with its position instead of a silent failure.

How do I beautify JSON?

Paste your JSON and choose Format — it is re-indented and pretty-printed into clean, readable JSON. "Beautify" and "pretty-print" mean the same thing: adding consistent indentation and line breaks so nested structures are easy to scan.

Is my JSON sent to a server?

No. Parsing and formatting happen entirely in your browser with the native JSON engine. Nothing leaves your device.

Everything runs locally in your browser — your input is never uploaded.