Skip to content
ToolsNow
Guides All tools
Developer

JSON formatter, validator and minifier

Paste JSON to check it and read it. Syntax errors are reported with the line and column they occur on, rather than a character offset you have to count to.

Runs in your browser — your input is not uploaded to ToolsNow.

JSON
0 chars0 words0 lines
Formatted JSON
0 chars0 words0 lines

How to use

  1. Paste your JSON. Validation and formatting happen as you type.
  2. Choose beautify or minify. Beautify for reading, minify for shipping. Indent is adjustable.
  3. Read the structure summary. Key count, object and array counts, and nesting depth — a quick sanity check on an unfamiliar payload.

Questions

Why does my JSON fail when it looks fine?

The usual culprits are a trailing comma after the last item, single quotes instead of double quotes, unquoted keys, or a stray comment. None of these are legal JSON even though JavaScript accepts most of them.

Where exactly is the error?

The tool converts the parser’s character offset into a line and column and shows both. Most validators only report "position 412", which is useless in a large file.

Does minifying change the data?

No. It removes only whitespace between tokens. The parsed value is identical, so the tool round-trips through a real parse rather than using string tricks.

Is my data uploaded?

No. Parsing and formatting use your browser’s own JSON engine. This is safe for API responses containing customer data.

Examples and checks

Format JSON to inspect nesting and find syntax errors before using a configuration or API response. Formatting checks syntax; it does not validate the business rules or schema expected by another application.

A valid object

Input or situation
{"name":"Ada","active":true}
Result
{ "name": "Ada", "active": true }

Indentation changes the presentation while keeping these values intact. JSON requires double-quoted property names.

A trailing comma

Input or situation
{"active":true,}
Result
Validation error

A comma must be followed by another member. Remove the comma before the closing brace.

Before you use the result

Published by ToolsNow. How tools and sources are checked · Report a problem

Read more

Related tools