Paste any JSON to instantly pretty print, minify, or validate it with this free online JSON formatter. Syntax errors are detected and displayed with exact line and column numbers so you can fix issues fast. Features include customizable indentation (2 spaces, 4 spaces, or tabs), alphabetical key sorting, full syntax highlighting with color-coded tokens, and real-time JSON statistics showing size, key count, array count, and nesting depth. All formatting happens entirely in your browser — no data is sent to any server. Works offline, no signup required.
Whether you're debugging a malformed API response or reviewing a config file, the workflow is the same: paste, format, fix any errors flagged, and copy. The formatter never sends data to a server, so even production payloads with sensitive customer info can be pasted safely.
\uXXXX) and number precision exactly as input.{"a": 1,} is invalid. JS5 and YAML allow them, which trips people up. Strip before saving.{'key': 'value'} is JS object literal syntax, not JSON.{key: 1} works in JS but breaks every JSON parser. Always quote keys: {"key": 1}.// comments or /* */. If you need them, switch to JSON5 or JSONC and document the dependency.Number.MAX_SAFE_INTEGER. JS loses precision past 253. Server IDs and Discord snowflakes need to be quoted as strings to survive the round-trip."é" and "\u00e9" are equivalent but produce different bytes. Pick one consistently for diff-friendly storage.{"key": "value"} and ordered arrays [1, 2, 3]. JSON supports six data types: string, number, boolean, null, object, and array. It's the dominant data format for REST APIs, configuration files, and database storage.
'name' → "name"{"a": 1,} is invalid. Remove the comma after the last item.{name: "John"} is JavaScript, not JSON. Keys must be quoted.// or /* */.const obj = JSON.parse(jsonString); — and serialize with JSON.stringify(obj, null, 2)import json; obj = json.loads(json_string) — serialize: json.dumps(obj, indent=2)import "encoding/json"; json.Unmarshal([]byte(jsonString), &obj)$obj = json_decode($jsonString, true);
JSON.parse() and JSON.stringify() APIs. No data is ever sent to a server. The tool works fully offline. We strongly recommend not pasting production secrets or API keys into any online tool — as a general security practice.