JSON ToolsavailablePopular

JSON Formatter

Format, validate, minify, and sort JSON locally.

JSON input

Paste strict JSON to format, minify, or validate locally.






Formatted JSON outputRead-only

Formatted JSON will appear here.






Options

Options apply the next time you format or minify; your existing output is unchanged.

What this tool does

Format, validate, minify, and optionally sort strict JSON without sending it anywhere. Formatting makes JSON easier to read; minifying removes nonessential whitespace.

How to use

  1. Paste valid JSON.
  2. Choose indentation and optional key sorting.
  3. Select Format or Minify.
  4. Copy, download, or move the result back to the input.

Privacy and limitations

Processing happens locally in this browser and input is never automatically saved. Only strict JSON is accepted: comments, single-quoted strings, and JavaScript object literals are not valid JSON.

Frequently asked questions

What is the difference between formatting and minifying?

Formatting adds readable indentation; minifying removes optional whitespace.

Why are comments rejected?

Comments are not part of the JSON standard, so the browser's strict JSON parser rejects them.

Can JSON start with an array or primitive value?

Yes. Arrays, strings, numbers, booleans, and null are all accepted JSON roots.

Does sorting keys change array order?

No. Sorting applies recursively to object keys only; array item order is preserved.

Is JSON formatting encryption?

No. Formatting changes presentation only and does not encrypt or secure the data.

Practical guide

When to use it

Use it before reviewing an API response, committing a configuration file, or sharing JSON in a ticket. Indentation exposes the structure without changing values.

Three steps

  1. Paste the JSON response or file contents into the editor.
  2. Choose indentation and key sorting only if that matches the destination file.
  3. Format it, then copy or download the readable result.

Example and a common mistake

For example, turn a one-line API response such as {"ok":true,"items":[1,2]} into a reviewable document.

Formatting is not validation of a business schema: valid JSON can still be missing a field your application requires.

JSON

Available

JSON Validator

Check JSON syntax and pinpoint invalid data.

JSON

Available

JSON Minifier

Remove nonessential whitespace from JSON documents.

JSON

Available

JSON Sort Keys

Sort JSON object keys for predictable file diffs.