Skip to content
QuicklyTools

JSON Formatter

Format and beautify JSON with 2-space, 4-space or tab indentation and optional key sorting. Shows exact error locations.

Runs in your browser
Loading tool…

About the JSON Formatter

Turn minified API responses and config files into readable, indented JSON. If the input is invalid, you get the line and column of the problem instead of a vague failure. Optional key sorting makes two JSON documents easier to compare.

Your data is processed in the browser and never sent to a server, so it is safe to paste payloads that contain tokens or personal data.

How to use it

  1. Paste JSON or open a .json file.
  2. Pick indentation and whether to sort keys.
  3. Copy or download the formatted JSON.

Good to know

  • Numbers larger than 2^53 lose precision when parsed by JavaScript; keep big IDs as strings.
  • Comments and trailing commas are not valid JSON and will be reported as errors.

Frequently asked questions

What's the difference between formatting and validating?

Formatting re-indents valid JSON. The JSON Validator focuses on finding and pinpointing errors.

Can it format JSON Lines (NDJSON)?

Not directly — each line is a separate document. Format lines one at a time.

More developer tools →