Free

JSON Formatter & Validator

Pretty-print, minify, and get the exact line and column of a syntax error. Everything happens on your machine, so a payload with customer data in it never leaves the tab.

  • Free forever
  • No signup
  • Runs in your browser

At a glance

Takes
Any JSON document, minified or already formatted
Returns
Formatted, minified or validated - with the error's line and column
Handles
Long numbers preserved exactly, and keys sortable without reordering data
Privacy
Runs in your browser - nothing you paste is uploaded

Nothing you type leaves this page

This tool runs entirely in your browser. Nothing you type or paste is sent to Revquix or to anyone else, no account is needed, and the page keeps working with your network disconnected.

Full detail in our privacy policy and AI policy.

How this works

About JSON Formatter

What it checks, what it deliberately does not, and how to read the output.

The error position is the point

Every JSON tool can tell you a document is invalid. What you actually need is where, and browsers are unhelpful here: the message from JSON.parse differs between Chrome, Safari and Firefox, and whether it includes a position at all has changed between V8 versions. So this tool parses twice. The browser's own parser decides validity, and if it rejects the document a second hand-written scanner re-reads the input to report the precise line and column, with the offending line shown and a caret under the character.

That second pass runs only when something is wrong, so a valid document costs nothing extra. And the messages name the actual mistake rather than the symptom: a trailing comma, a single-quoted string, a comment, an unescaped newline inside a string, and a leading zero on a number are each reported as themselves, because those five account for most hand-edited JSON failures.

Duplicate keys, which no parser warns you about

If an object contains the same key twice, JSON is technically valid and every parser silently keeps the last one. The field you meant is simply gone, with no error anywhere. Every real instance of this is a bug, usually from a merge or a hand edit, so this tool flags it as a warning with the line number even though the document parses cleanly.

Querying with a JSON Pointer

The path box takes an RFC 6901 JSON Pointer - the same syntax that JSON Schema validation errors, JSON Patch and OpenAPI already use. That means a pointer copied straight out of a validation failure resolves here unchanged, which is the common case for using it at all. A dotted path would have read more naturally and cannot express a key containing a dot, which real documents contain.

  • Format or minify, with two-space, four-space or tab indentation
  • Optional alphabetical key sorting, for diffing two API responses
  • Depth, key count, object and array counts, and the size saved by minifying
  • Up to 2 MB, refused rather than silently truncated beyond that

What it will not do

It does not accept JSON5, JSONC or any other relaxed dialect: comments, trailing commas and unquoted keys are reported as errors, because accepting input that your own parser will reject would make this tool useless as a check. It also does not validate against a JSON Schema - that is a different job with a different output.

One limitation worth knowing because it is invisible: numbers are re-serialised by the browser's JSON implementation, so an integer beyond the precision of a 64-bit float, such as a nineteen-digit id, comes back rounded. That is JavaScript rather than this tool, and the fix in your own code is to carry such values as strings.

FAQ

Questions people actually ask

The ones that come up before somebody uploads anything.

Is my JSON uploaded anywhere?

No. Parsing, formatting and validation all happen in your browser, there is no API call at any point, and the page keeps working with your network disconnected. You can confirm it in your browser's network tab, which is the only assurance worth anything for a tool handling payloads that may contain real data.

Why does it say my JSON is invalid when my editor accepts it?

Almost always because your editor accepts JSON5 or JSONC - comments and trailing commas - and strict JSON does not. Both are the commonest causes and both are reported here with a position. If your file is a config that genuinely allows comments, it is not JSON and should not be fed to a strict parser.

Does sorting keys change my data?

Yes, and that is why it is off by default. Formatting only changes whitespace; sorting rewrites the document's key order, which matters if anything downstream depends on it. It is offered because comparing two API responses is much easier when both are sorted, and the tool warns you whenever it is applied.

What is the largest document it will take?

Two megabytes. Beyond that it refuses rather than processing part of the input, because a formatter that silently handles the first 2 MB of a 3 MB paste returns a confidently wrong answer - the one outcome worse than an error message.

Why is my long number coming back different?

JavaScript numbers are 64-bit floats, so any integer above about 9 quadrillion loses precision the moment it is parsed. Nineteen-digit ids from Twitter, Discord or a Snowflake generator are the usual victims. The fix is on the producing side: send those values as JSON strings.

Next, try one of these

More from Developer, or browse the full catalogue.

Past the payload

The malformed response is rarely the actual problem

A formatter tells you the JSON is broken at line 14. It cannot tell you why that service started returning it, whether the contract changed under you, or what the right thing to do about it is. An hour with a senior engineer on the system behind the payload is a different kind of help.

Talk to an engineer from ₹549/hr