JSON
JSON Formatter
Paste JSON to pretty-print it, check whether it parses, or minify it. The work stays on this device.
Input is processed in your browser. DevToolMage does not upload it, store it, or send it to analytics.
Paste JSON to format and validate.
How it works
The tool uses the browser JSON.parse and JSON.stringify APIs. Validation is syntactic only.
Input and output
Input is text. Output is formatted JSON, minified JSON, or a parse error. Binary JSON and JSON Lines are out of scope.
Examples
Minified API body
Paste {"ok":true,"items":[1,2]} and format it to inspect nesting.
Broken comma
A trailing comma or single quotes will fail parse and show the engine error.
How to use this tool
- Paste JSON into the input.
- Use Format to indent, Minify to compact, or keep the live validation result.
- Copy the output when you need it in an editor or request body.
Limitations
- Does not validate JSON Schema, OpenAPI, or TypeScript types.
- Very large documents may be slow in the browser. A size guard rejects extreme pastes.
- Duplicate keys follow JavaScript JSON.parse behavior (last key wins).
Questions
Does formatting change my data?
Pretty-print and minify change whitespace only. Object key order follows JSON.stringify. Values are not rewritten.
Is this a JSON Schema validator?
No. It checks JSON syntax, not a schema. Invalid JSON shows a parse error. Valid JSON against the wrong schema still passes.
Is my JSON uploaded?
No. Parsing and formatting run in your browser. DevToolMage does not send the payload to a server.
Related tools
Encoding
Base64 Encoder and Decoder
Convert text to Base64 or back again, with a URL-safe option. Base64 hides nothing; anyone can decode it.
Tokens
JWT Decoder
Read the header and payload of a compact JWT. Decoding is not verification. A decoded token is not proven authentic.
Hashing
Hash Generator
Create a digest of text. Hashing is one-way and is not encryption. MD5 is legacy only.