Pretty-print compact JSON
{"a":1,"b":[2,3]}{
"a": 1,
"b": [
2,
3
]
}Default 2-space indent. Switch to 4 or 8 spaces to match your team style.
All processing runs in your browser — no files or inputs are uploaded to a server.
Paste a JSON document on the left to get the formatted result on the right. Pretty mode adds indentation; Minify mode strips whitespace for compact output. Invalid JSON shows the error position with line and column — useful when debugging large API responses or config files where the syntax error is buried.
Indent width is configurable (2, 4, or 8 spaces). The tool runs entirely in your browser, so even huge JSON payloads stay on your machine.
{"a":1,"b":[2,3]}{
"a": 1,
"b": [
2,
3
]
}Default 2-space indent. Switch to 4 or 8 spaces to match your team style.
{
"user": "alice",
"scopes": ["read", "write"]
}{"user":"alice","scopes":["read","write"]}Useful when you need a compact payload for an HTTP body or to paste into a config string.
{
"name": "bob"
"age": 30
}Expected , or } at line 3, column 3
Errors come with line + column so you can jump straight to the spot.
No. Everything runs in your browser via the standard JSON.parse and JSON.stringify APIs. Your data never leaves the page.
Strict JSON does not allow comments or trailing commas. JSON5 or JSONC files (tsconfig.json, VS Code settings) will be rejected here. Strip comments first or use a JSON5-aware formatter.
JSON.stringify only escapes control characters and quotes. Non-ASCII text like Korean or Japanese is valid JSON and stays readable. If you need ASCII-only output, encode it separately.
No hard cap, but very large documents (10+ MB) may freeze the page during parsing. For huge files prefer a streaming parser like jq.
No. Numbers parse into JavaScript's Number type (IEEE 754 double), so integers above Number.MAX_SAFE_INTEGER (2^53 − 1, ≈9.007 × 10^15) silently lose precision. A 19-digit Twitter or Discord snowflake ID round-trips with the wrong final digits. If you need the exact value, quote it as a string in the source JSON before formatting, or use a BigInt-aware parser.
RFC 8259 leaves the behavior implementation-defined, and JSON.parse silently keeps the last occurrence. `{"a":1,"a":2}` becomes `{"a":2}` after formatting — the first value is gone with no warning. Duplicates usually indicate a bug in the producing code, so search the raw input for the suspect key before trusting the formatted output.
JSON (JavaScript Object Notation) is a text format for structured data defined by RFC 8259. A formatter does two things — parse (text → in-memory tree) and serialize (tree → text with chosen whitespace). Errors only surface at the parse step.
Common gotchas: keys must be double-quoted strings, trailing commas are forbidden, and the only allowed primitives are strings, numbers, booleans, null, arrays, and objects. Functions, Date, and undefined cannot appear directly — they need an explicit conversion at the application layer.
Several JSON-adjacent formats look similar but parse differently. JSON5 adds comments, trailing commas, and unquoted keys for human-edited config files. JSONC (used by tsconfig.json and VS Code settings) accepts comments and trailing commas. JSON Lines (NDJSON) drops the outer array and writes one independent JSON object per line, ideal for streaming logs and append-only files. This tool implements strict RFC 8259 only, so any of those variants will throw a parse error. Strip the extras first, or route to a format-aware tool.
How JSON Schema replaces hand-written payload validation with a declarative contract, the keywords that matter, and the format gotcha that bites people.
JSON and YAML model the same data, but their failure modes differ sharply: YAML's type coercion and whitespace traps versus JSON's missing comments and verbosity.
Validate a JSON document against a JSON Schema (Draft 2020-12 by default). Errors point to the failing path with a human-readable reason — fully client-side via Ajv.
Convert between JSON and YAML in either direction. Clear error messages with line numbers.
Check YAML syntax and surface every error with line and column. Built for k8s, GitHub Actions, and CI configs.
Convert between CSV and JSON, both directions. RFC 4180 parsing handles quoted fields and embedded newlines; delimiter and header options are configurable.