JSON formatter

Format, validate and minify JSON. Errors show the exact line and column, with a clear explanation of what’s wrong.

Advertisement
Indent
Paste JSON to format and check it.
Checked as you type
Numbers and text are kept exactly as written
Advertisement

How to format and validate JSON

  1. Paste your JSON into the left-hand box (the top box on a phone).
  2. If it’s valid, the formatted version appears straight away. If not, the message shows where the problem is and what to fix.
  3. Choose the indent you want, or Minify to make it as small as possible, then press Copy.

Handy uses

Frequently asked questions

How do I format JSON?

Paste your JSON into the box. It’s checked and formatted as you type. Choose 2 spaces, 4 spaces or tabs for the indent, or Minify to remove all spacing, then press Copy.

How do I find an error in my JSON?

If your JSON isn’t valid, Werdz shows the line and column of the first problem with a plain-English explanation, such as a missing comma or a trailing comma. Press Show in input to jump straight to it.

What are the most common JSON mistakes?

Trailing commas after the last item, single quotes instead of double quotes, keys without quotes, comments, and values like True, None or undefined, which come from other languages. Werdz explains each of these when it finds them.

Does it change my numbers?

No. Many JSON formatters run numbers through JavaScript, which quietly rounds very large ones: 12345678901234567890 becomes 12345678901234567000. Werdz keeps every number and string exactly as you wrote it.

What does the duplicate key warning mean?

Your JSON has the same key twice in one object. That’s technically allowed, but most programs keep only the last value and ignore the others, which can cause confusing bugs.

Is my JSON private?

Yes. Formatting and checking happen in your browser, and your JSON is never uploaded or saved, so it’s safe for API responses, configuration files and data that contains personal details or keys.

More free text tools