DevToolMage

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

  1. Paste JSON into the input.
  2. Use Format to indent, Minify to compact, or keep the live validation result.
  3. 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