JSON Formatter
Validate, format, and minify bounded strict JSON without executing or saving it.
Runs in your browser
Runs in this browser. Input is not sent to a utility provider.
Input limits
- Up to 1 MiB of UTF-8 text.
- At most 100 nested levels.
- At most 100,000 visited values.
- Formatting, minifying, and key sorting stop before output exceeds 4 MiB of UTF-16 code units.
Validate or transform strict JSON
Validation checks RFC 8259 syntax, decoded duplicate member names, numeric precision risk, depth, and visited-value limits before native parsing. This is syntax validation, not JSON Schema validation. Transformations also stop before output would exceed the displayed 4 MiB limit.
Enter one strict JSON root value. All root kinds are accepted. Limit: 1 MiB UTF-8, 100 nested levels, and 100,000 visited values.
Sort keys is a separate, opt-in destructive transformation. It recursively changes object member order and may affect downstream diffs or signatures. Array order remains unchanged.
Transformed JSON
Example tasks
- Validate any strict JSON root kind, including objects, arrays, strings, numbers, booleans, and null.
- Format with two or four spaces, or explicitly minify a document after loss checks pass.
- Opt in to recursive object-key sorting while preserving every array's order.
What this tool does not prove
- Syntax validation is not JSON Schema validation and does not establish whether data is trustworthy or appropriate for an application.
- Duplicate decoded member names are rejected before native parsing because reserialization would discard values.
- Integers outside JavaScript's exact safe-integer range are reported as valid syntax with a precision warning; destructive reserialization is blocked.
- Transformations are preflighted and stop before serialized output would exceed 4 MiB of UTF-16 code units.
- Sort keys changes object source order and may affect downstream diffs or signatures. It never runs automatically.
- Input remains in current-page memory and is not executed, rendered as HTML, saved, sent, copied, downloaded, or shared automatically.