JSON Formatter · Beautifier · Validator

Format, beautify, minify, and validate JSON with support for JSONC (comments) and JSON5. Includes optional JSON Schema validation.

Options
Configure JSON formatting and validation settings
Input
Paste your JSON, JSONC, or JSON5 here (Cmd/Ctrl+Enter to format)
Loading...
Output
Formatted output will appear here
Loading...
Quick Guide

Supported Formats

  • JSON: Standard RFC 8259 strict JSON
  • JSONC: JSON with comments and trailing commas
  • JSON5: JSON5 format with unquoted keys, trailing commas, etc.
  • Auto: Automatically detects the format

Actions

  • Format: Pretty-print JSON with indentation
  • Minify: Remove all whitespace for compact output
  • Validate: Check syntax and optionally validate against schema

About JSON Formatter · Beautifier · Validator

JSON is everywhere — API responses, config files, log lines, webhook payloads — but it's rarely delivered in a shape you can read. A minified one-line blob from a fetch call or a log aggregator is technically valid and completely impenetrable. This formatter takes that wall of text and turns it into clean, indented, color-aware structure so you can actually see what you're looking at.

Beyond pretty-printing, it validates. Paste something that's almost JSON and it tells you exactly where the syntax breaks — a missing comma, an unquoted key, a trailing bracket. It also understands the relaxed dialects you hit in the real world: JSONC (JSON with comments, as used in tsconfig and VS Code settings) and JSON5 (trailing commas, single quotes, unquoted keys), so config files don't get rejected for being human-friendly.

Everything runs locally in your browser. Sort keys alphabetically to diff two responses, minify before pasting into an environment variable, or validate a payload against a JSON Schema — none of it ever leaves your device, which matters when the JSON contains tokens, customer records, or anything you'd rather not paste into a random website.

How to use JSON Formatter · Beautifier · Validator

  1. Paste your JSON

    Drop a raw API response, a minified blob, or a config file into the input. JSONC comments and JSON5 trailing commas are accepted, so config files work as-is.

  2. Format or minify

    Beautify to get readable, indented output, or minify to collapse everything onto one line for environment variables and compact storage.

  3. Validate and fix errors

    If the input isn't valid, the error message points to the exact position so you can find the missing comma or unbalanced bracket quickly.

  4. Sort keys or check a schema

    Optionally sort object keys alphabetically to make two payloads diffable, or validate the data against a JSON Schema to confirm it matches the contract.

Frequently asked questions