Data tools
JSON Formatter.
Validate, pretty-print or compact JSON locally.
Your text is processed in your browser.
- Input UTF-16 units
- —
- Output UTF-16 units
- —
- Parsed value nodes
- —
- Root type
- —
Ready.
Exact rules, limits & privacy
Default: native JSON.parse followed by JSON.stringify with two spaces. Choose four spaces or a tab for pretty-print; compact removes formatting whitespace. Validate preserves the original valid text exactly, without pretty-printing. Blank input is an error. All JSON root types are accepted, including null, arrays and primitives. Errors include native parse diagnostics; wording differs by browser. This is syntax validation, not a JSON Schema validator or repair tool. Duplicate object keys use the last value, native object-key ordering applies, and JavaScript IEEE-754 numeric precision/negative-zero serialization apply. Large integer precision is not preserved; use strings for exact identifiers. Nonfinite parsed numbers (such as 1e400) are rejected rather than silently serialized as null. Nesting is limited to 100 containers (strings/escapes do not add depth); output is limited to 1,000,000 UTF-16 units with an error, never truncation. Node count includes the root and every parsed property/array value, not duplicate keys discarded by JSON.parse. No Unicode normalization; JSON.stringify escaping applies. Export is UTF-8 .json.
Input limit: 100,000 UTF-16 code units. Larger text remains intact and current results are cleared with an error. Counts use UTF-16 units, not visual characters. No uploads, input tracking, saved drafts or external text processing. Page and first-party style delivery make ordinary network requests; inline CSS keeps the page usable if the stylesheet is unavailable. Copy requires browser support/permission. Downloads are UTF-8 JSON. Empty results cannot be copied or downloaded.