Skip to content
Web Everyone Free Online Website Management Tools
Web Everyone

Colour mode

↑↓ to choose Enter to open Esc to close

JSON Formatter and Validator

Format, validate and minify JSON. Finds the exact line and column of an error and explains it, and can sort keys.

Runs in your browser Free, no sign-up

Everything happens in your browser. Nothing you enter or choose is uploaded.

How to use the JSON formatter

  1. Paste your JSON, open a file, or choose Load example.
  2. Choose Format to make it readable, or Minify to make it compact. Turn on Sort keys to put every object's keys in alphabetical order, which makes two files easy to compare.
  3. Copy or download the result. If there is a mistake, the error message says where and why.

JSON rules in short

  • Strings and keys use double quotes: "name", never 'name'.
  • No comma after the last item: [1, 2, 3], not [1, 2, 3,].
  • No comments, no undefined, NaN or Infinity; use null for "nothing".
  • Numbers have no leading zeros or plus sign: 7, -0.5, 1e6.
  • Line breaks and tabs inside a string must be written as \n and \t.

Frequently asked questions

How do I format JSON?

Paste it in the left box (or open a .json file) and choose Format. The result is indented with 2 or 4 spaces or tabs, ready to copy or download. Minify does the opposite: it removes every space and line break to make the JSON as small as possible.

How do I find the error in my JSON?

Choose Validate (or just Format). If the JSON is invalid you get the line and column, the line itself with a marker under the problem, and a plain explanation. "Show in the text" puts the cursor right at the error.

What are the most common JSON mistakes?

A comma after the last item in a list or object, single quotes instead of double quotes, keys without quotes, comments, and a missing comma between two items. JavaScript allows most of these; JSON allows none of them.

Does the formatter change my numbers?

No. Numbers are kept exactly as you wrote them, even very large ones that JavaScript itself would round, so IDs and amounts stay intact. Strings and their escapes are kept as written too.

Is my JSON sent anywhere?

No. Everything runs in your browser, so you can safely format JSON that contains private data or API keys.

Is there a size limit?

Only your device's memory. Files of several megabytes format in about a second on a recent phone or computer.

Browse all tools