← All text tools

JSON formatter & validator

Format, minify, sort and validate JSON, with the exact line of any error. Big numbers stay exact.

  • Free
  • No sign-up
  • Works on any device

About JSON formatter & validator

Paste JSON to make it readable with indentation, check that it is valid, and see exactly where an error is. You can also minify it for smaller files. Everything runs in your browser, so API responses and config files with private data stay on your device.

How to use JSON formatter & validator

  1. Paste your JSON into the input.
  2. Choose format, minify or sort keys.
  3. Fix any error shown at its line, then copy the result.

Why use this tool?

Also known as

Frequently asked questions

Why does my JSON say it is invalid?

The usual causes are a trailing comma, single quotes instead of double quotes, unquoted keys, or a missing bracket. The error message shows the line and the character.

Is my JSON uploaded anywhere?

No. It is formatted by JavaScript in your browser and never leaves your device.

What are the most common JSON mistakes?

Trailing commas, single quotes instead of double quotes and unquoted keys are the usual causes. Comments are also not allowed in standard JSON.

What does sorting keys do?

It reorders object keys alphabetically. This does not change the meaning, and it makes two files easier to compare.

Is JSON formatter & validator free?

Yes. JSON formatter & validator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put JSON formatter & validator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools