JSON Formatter & Validator

Format and validate JSON, with the error pinned to a line and column

calendar_today Last updated: September 17, 2026

Indent
check_circle

Valid JSON.

Formatted

{
  "name": "سهل",
  "tools": 80,
  "free": true,
  "tags": [
    "json",
    "dev"
  ]
}

Formatted in your browser — nothing is uploaded. Numbers and strings are copied through exactly as written, so long IDs keep every digit.

lightbulb

Sahel's JSON formatter indents, minifies and validates JSON, pins any syntax error to a line and column, and copies numbers and strings through verbatim — all inside your browser.

help_outline

How does this tool work?

1

Paste your text

Drop JSON into the box, or type it in.

2

See the error or the result

An error is pinned to a line and column; otherwise the formatted text appears.

3

Copy what you need

Take the formatted or the minified version in one click.

Frequently asked questions

Does the formatter change my numbers? expand_more
No. Numbers are copied through exactly as written, so 1e3 does not become 1000 and a twenty-digit ID does not lose its last digits — which is what happens in tools that parse and re-serialise.
Why does it say “trailing comma” when my file works? expand_more
Some languages allow a comma before the closing bracket, but the JSON standard itself does not. If your file is config for a lenient tool that is fine; if it is going to be sent as JSON, the other end will reject it.
Is my file uploaded anywhere? expand_more
No. Formatting and validation both happen in your browser, so the text never leaves your device.
What is the difference between formatting and minifying? expand_more
Formatting adds spaces and line breaks to make the file readable by a person; minifying strips all of them so it is as small as possible to send over a network. The content itself is identical either way.