194 tools

JSON Formatter

Validate, pretty-print, minify and sort keys.

Code & JSON Tools

About the JSON Formatter

The JSON Formatter validates JSON, pretty-prints it with your choice of indentation, minifies it to one line and can sort object keys alphabetically. If the JSON is invalid, it tells you what went wrong so you can fix it.

Category
Code & JSON Tools
Price
Free
Account
Not required
Runs
Entirely in your browser

How to use the JSON Formatter

  1. Paste your JSON.
  2. Pick an indentation (or minify) and optionally sort keys.
  3. Copy the formatted JSON.

Privacy

Everything runs in your browser: what you type or paste is processed by JavaScript on your device, not on a server. If you are signed out, nothing is saved at all. If you sign in with Google, your inputs and settings are saved privately to your account so they sync across devices.

Frequently asked questions

Is the JSON Formatter free?

Yes. JSON Formatter is completely free with no sign-up, no usage limits and no watermarks.

Is my data private?

Yes. The JSON Formatter processes everything in your browser. Signed out, nothing is saved; signed in, your inputs sync privately to your own account.

Why is my JSON invalid?

The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, or missing brackets. Standard JSON allows none of those.

Does formatting change my data?

No. Pretty-printing and minifying only change whitespace. Sorting keys changes key order, which JSON treats as insignificant.

Does it work on my phone?

Yes. Toolbench runs in any modern browser on desktop, tablet or phone — there is nothing to install.

Related code & json tools

All 13 code & json tools →

Last updated