Skip to content
ToolNestby WeTwo

JSON Formatter and Validator

Paste JSON to make it readable, check that it is valid, minify it or sort its keys. Errors show the line and column so you can fix them quickly.

Runs in your browser. Your files never leave your device.

Indent

Your JSON is checked in your browser and never sent anywhere, so it is safe to paste API responses and config files.

JSON formatter: how to use it

  1. 1Paste your JSON.
  2. 2Tap Format & validate, Minify or Sort keys.
  3. 3Copy or download the result.

Common JSON errors

Most invalid JSON comes from a few mistakes: a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, or comments, which JSON does not allow. The error message points to the line and column where parsing stopped, which is usually just after the real problem.

Formatting with 2 spaces is the most common style for config files and APIs. Minifying removes all spaces and line breaks to make files smaller for sending over a network.

Safe for private data

API responses, tokens and config files often contain secrets. This formatter runs entirely in your browser, so nothing you paste is uploaded or logged.

Frequently asked questions

How do I check if JSON is valid?

Paste it and tap Format & validate. You'll see 'Valid JSON' or the error and where it is.

What does minify do?

It removes all unnecessary spaces and line breaks to make the JSON as small as possible.

Can I sort the keys?

Yes. Sort keys orders every object's keys alphabetically, which makes two JSON files easier to compare.

Is anything sent to a server?

No. It all runs in your browser and nothing you enter is stored or sent.