Skip to content
CodexValley

JSON Formatter & Validator

Available

Format, minify, sort and check JSON, with the line and column of any error.

Use the tool

Everything runs in your browser. Your text is not uploaded or stored.

About this tool

Paste JSON to format it so it is easy to read, shrink it to one line, sort its keys, or just check that it is valid. If something is wrong, the message points to the line and column where the problem starts.

How it works

  • The text is parsed with your browser's own JSON parser, which follows the JSON standard strictly.
  • Formatting uses 2 or 4 spaces. Minifying removes every space and line break that is not inside a string.
  • Sorting orders object keys from A to Z at every level. Array order is never changed.

Common questions

Why does valid-looking JSON fail?

JSON is stricter than JavaScript. Keys need double quotes, strings need double quotes, and trailing commas, comments and single quotes are not allowed.

Is my JSON sent anywhere?

No. It is parsed in your browser and never leaves your device, so it is safe for private data. Still, avoid pasting secrets you do not need to.

Your text is processed in your browser and is never uploaded.