Skip to content
Hakoro

JSON Formatter

New

Format, validate and minify JSON in your browser, with clear error messages and exact numbers. Nothing you paste is uploaded.

Runs in your browser. Nothing you enter is uploaded

Loading tool…

About JSON Formatter

Paste JSON to format it with clean indentation, check that it's valid, or minify it. If something's wrong you'll see what and where in plain words, such as a missing comma on line 12, instead of a cryptic parser error.

It never changes your data: big numbers such as 64-bit IDs keep every digit, and text is written exactly as it came in. Everything runs in your browser, so API responses, tokens and personal data never leave your device.

How to use JSON Formatter

  1. 1Paste your JSON, or open a .json file.
  2. 2Choose formatted, minified or tree view, and the indentation.
  3. 3Copy the result or download it as a file.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Formatting and validation run in your browser, so nothing you paste or open leaves your device.

Why is my JSON invalid?

The usual causes are trailing commas, single quotes, keys without quotes, comments and unclosed brackets. JavaScript allows some of these, but JSON doesn't. The error message names the problem and marks where it is.

Will formatting change my numbers?

No. Many tools read JSON into JavaScript numbers, which silently round whole numbers above 9,007,199,254,740,991. This formatter writes every number exactly as you wrote it.

What does “Sort keys” do?

It puts the keys of every object in alphabetical order, which makes two JSON documents easier to compare. Arrays keep their order.

How large can the JSON be?

Files up to 20 MB. Anything over 1 MB is formatted when you press Format, so typing stays fast.