Skip to content
New Developer

JSON Formatter

Paste JSON to pretty-print it with the indentation you like, squeeze it onto one line, or sort its keys. If it isn’t valid, you get the line and column where it breaks.

Loading JSON Formatter…

Runs on your device. Nothing you paste is uploaded.

How to use the JSON Formatter

  1. Paste your JSON, or drop a .json file onto the box.
  2. Choose an indent (2 spaces, 4 spaces or tabs), and tick “Sort keys” to order object keys A to Z.
  3. Select Format or Minify, then copy or download the result.

Private by design

Plenty of online tools send what you paste to their server, which is a real risk with API keys, tokens and customer data. JSON Formatter runs entirely in your browser: nothing is uploaded, logged or stored, and it keeps working with your network switched off. It’s free, with no account and no limits.

Questions

Is my JSON sent anywhere?

No. It’s parsed by your browser’s own JSON parser on your device, which matters for API responses, config files and anything with a token in it.

Why does it say my JSON is invalid?

The usual causes are a comma after the last item, single quotes instead of double quotes, comments, or keys without quotes. JavaScript allows those; JSON doesn’t. The message points at the line and column where reading stopped.

Will formatting change my numbers?

No. Many formatters round whole numbers bigger than 9,007,199,254,740,991, like some database IDs, because JavaScript can’t hold them exactly. This one keeps every number exactly as you wrote it, and it keeps your keys in their original order unless you sort them.

Is anything I paste sent to a server?

No. Every tool runs in your browser, so tokens, keys, customer data and code stay on your device. Once the page has loaded, the tools work offline too.

Do I need an account?

No. Every developer tool is free to use without signing in, with no limits.

Part of Developer Tools

16 free developer tools that run in your browser: format JSON, decode JWTs, test regex, compare text and encode Base64 without sending anything to a server.

About Developer Tools

See all

Markdown Tools

Tool · New

18 free Markdown tools that run in your browser: an editor, slides, a README generator, Markdown to PDF, Word, Slack and Jira, a linter and more.

Label Maker

Tool · New

Print labels from Excel, Google Sheets or a CSV file: pick an Avery-compatible sheet, skip used labels and download a PDF. Addresses, QR codes and barcodes.

14 free printable planners and trackers: weekly and monthly plans, routines, meals, chores, budgets, workouts and more. Edit and print in your browser.

Search by name, description or tag. Press Enter to see every match.