JSON Formatter
Pretty-print, minify, validate & sort-key JSON.
A free JSON formatter / validator / minifier that pretty-prints with 2-space, 4-space or tab indent, minifies to a single line, and can optionally sort object keys alphabetically. Parse errors are shown with a message, and everything runs locally — your data is never uploaded.
How to use
- Paste your JSON into the input box on the left.
- Choose an indent (2 / 4 / Tab) or pick Minify for single-line JSON.
- Turn on Sort keys when you want a stable, diff-friendly order.
- Copy the result on the right; invalid JSON shows an error instead of garbage.
FAQ
- Is my JSON uploaded?
- No. Parsing and formatting run in your browser; the content never leaves your device.
- What does “Sort keys” do?
- It recursively reorders every object’s keys alphabetically, which makes it easier to compare two JSON documents or produce stable version-control diffs. Array order is preserved.
- Why am I getting a parse error?
- It means the input is not valid JSON — common causes are trailing commas, single quotes, unquoted keys or comments. The tool shows the engine’s error message (often with a position) to help you locate it.
Related tools
- 2FA Authenticator — End-to-end encrypted 2FA vault with live codes.
- Password Vault — Zero-knowledge vault for site logins; survives password changes.
- Data Format — Convert between JSON, YAML, TOML, CSV.
- Base64 — Encode / decode text & files in Base64.
- URL Encode — Encode / decode URL components.
- JWT Decode — Inspect JWT header & payload.