What This Tool Does
- Beautify ??re-indents JSON with 2 spaces, 4 spaces, or tabs.
- Minify ??removes whitespace to produce the smallest valid JSON. Useful for embedding in URLs, configs, or reducing payload size.
- Validate ??uses the browser's native parser; on failure shows the error message and (where the engine provides it) line/column.
- Tree View ??renders objects and arrays with collapsible nodes and type-colored values, useful for browsing large nested structures.
JSON Quick Reference
JSON (JavaScript Object Notation) is a text format for data exchange. Strict rules differ slightly from JavaScript object literals:
- Keys must be in double quotes ??single quotes are not allowed.
- Strings must use double quotes ??backslash-escaped Unicode (횞) is permitted.
- No trailing commas in arrays or objects (a common parse-error culprit).
- No comments ??line or block comments are invalid in strict JSON.
- Numbers don't allow leading + or trailing decimals (
+5and5.are invalid). - Special values
Infinity,NaN, andundefinedare not part of JSON.
Common Parse Errors
- Unexpected token ??usually a stray comma, missing comma, single quote, or unquoted key.
- Unexpected end of input ??a bracket or brace was not closed.
- Bad escape ??a backslash followed by something other than
",\,/,b,f,n,r,t, oru+4 hex digits.
Privacy
This page is a single static HTML file. No analytics, no network calls, no upload. Your JSON only exists in the textarea until you close the tab.