Developer tools

JSON Formatter

Validate, prettify, minify or sort JSON keys with clear syntax errors.

Make it yours

Processed in your browser

Your result

A little input. A useful result.

Adjust the example inputs, then select Format JSON.

A LITTLE KNOW-HOW

About this tool

Turn compact JSON into a readable document or remove formatting for transport. The formatter validates JSON syntax before producing output. You can also sort object keys recursively while preserving array order.

How to use it

  1. 1

    Paste a complete JSON value.

  2. 2

    Choose formatting, minification or key sorting.

  3. 3

    Run the formatter; fix any reported syntax error before copying.

Questions, answered

Does this support comments or trailing commas?

No. It accepts standard JSON. JavaScript object literals, comments and trailing commas need to be removed first.

Are very large numeric IDs preserved exactly?

Parsing uses JavaScript numbers. Integers beyond the safe integer range can lose precision. Represent large identifiers and exact decimal amounts as JSON strings before using this formatter.