Skip to content
beginthings.

Dev & Data

JSON formatter & validator

Paste JSON to check and format it. If something is wrong, you get the exact line and column. A repair mode fixes comments, trailing commas, single quotes and similar common mistakes.

Your JSON

Options

Layout

Result

How to use this tool

  1. Paste your JSON into the box, or load a sample.
  2. Choose 2 spaces, 4 spaces or tab indentation, or tick minify to shrink it.
  3. If it is invalid, read the error with its line and column, and tick repair common mistakes.
  4. Copy or download the result.

How it works

JSON is strict: property names need double quotes, there are no comments, and the last item cannot be followed by a comma. Those rules cause most "invalid JSON" errors. The validator reports the exact line and column of the first problem and says what it expected.

Repair mode is more forgiving. It accepts comments, trailing commas, single-quoted strings, unquoted property names and Python-style True, False and None, then writes clean standard JSON and tells you what it changed. Large numbers keep their exact digits, because the formatter never converts them to floating-point numbers. Everything runs on your device, so API responses and configuration files stay private.

Good to know

JSON is strict. Keys must be in double quotes, strings cannot contain raw line breaks, and the last item in an object or array cannot be followed by a comma. These small mistakes are the most common cause of parse errors, and the exact position in the message helps you find them quickly.

The repair option fixes frequent problems such as comments and trailing commas, but always review the result. Everything is parsed inside your browser, so API keys and customer data in your JSON are never uploaded. For very large files, minifying reduces size and formatting makes the structure easier to read.

Frequently asked questions

Why does it say a number is invalid?

JSON does not allow leading zeros (like 007), a plus sign, or a trailing decimal point.

Does it change my values?

No, apart from the layout and the optional key sort. Numbers keep their exact digits.

Is my JSON uploaded?

No. It is processed only in your browser.

More free tools you might need