Calculator

What the JSON Validator does

JSON Validator: checks Status, Output and Bytes from JSON Input, Indent and Sort keys. Example: indent 2 spaces, sort keys Keep order and action Validate gives status Valid JSON ✓.

The inputs are JSON Input, Indent, Sort keys and Action; the output is Status, Output and Bytes. Change any input and the output follows immediately.

Reading raw machine output is painful; a formatted view makes the structure obvious. That is usually what brings anyone cleaning up machine output here.

There is no account, no upload and no server round trip, because the page does the work itself.

The field reference, the method and a worked example using the default inputs follow the tool itself.

What do the JSON Validator fields mean?

The JSON Validator uses 4 inputs. Because the form arrives filled, the first useful result costs you zero typing.

FieldWhat to enterDefault
JSON Input paste or type any amount of text [ { "name": "YoursTools", "tools": 801, "categories": ["developer", "finance", "health"], "active": true }, { "name": "Demo App", "tools": 42, "categories": ["math", "converters"], "active": false } ]
Indent choose from 2 spaces, 3 spaces, 4 spaces or Tab 2 spaces
Sort keys choose from Keep order or A to Z Keep order
Action choose from Format, Validate or Minify Validate

How does the JSON Validator work?

Status, Output and Bytes ← f(JSON Input, Indent, Sort keys, Action)

Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same check.

Validation runs before the calculation, which is why a mistyped value shows an error rather than a plausible-looking result.

Worked example

These are the values the JSON Validator loads by default, and the result it produces from them. Open the tool above and you will find precisely these figures already in place.

Inputs
JSON Input[ { "name": "YoursTools", "tools": 801, "ca…
Indent2 spaces
Sort keysKeep order
ActionValidate
Result
StatusValid JSON ✓
Output[ { "name": "YoursTools", "tools": 801, "categories": [ "developer", "finance"…
Bytes176

Validating

Validation answers one question: is this legal JSON under RFC 8259? It is a syntax check, not a schema check. A valid document can still be the wrong shape for your application.

Checksgrammar conformancebrackets, commas, quoting, escapes
Reportsposition of first failureline and column
Does not checkschema, types, required keysuse JSON Schema for that

Worth knowing

  • RFC 8259 leaves duplicate-key behaviour undefined. Most parsers keep the last value; some keep the first. Reject duplicates explicitly when parsing untrusted input.
  • Numbers above 2^53 parse without error but lose precision silently in JavaScript. Transport large identifiers as strings.
  • A byte order mark at the start of the file causes many parsers to fail on the first character.

How to use it

  1. Paste your content into JSON Input.
  2. Pick a value for Indent: the options are 2 spaces, 3 spaces, 4 spaces or Tab.
  3. Pick a value for Sort keys: the options are Keep order or A to Z.
  4. Pick a value for Action: the options are Format, Validate or Minify.
  5. No confirmation step: what you type is what gets calculated.
  6. Read Status, Output and Bytes in the results panel.
  7. Use Copy Link if you want the same setup again later, or Print for a paper copy.

What this tool does not do

  • Processing happens in your browser, so very large inputs are bounded by available memory.
  • Output follows the common convention for this format; a specific toolchain may have its own house style.
  • There is no history: reload the page and the previous run is gone.

Frequently asked questions

JSON Input, Indent, Sort keys and Action. That is the whole form. Each field is pre-filled with a sensible default, so the quickest approach is to replace the one number you actually care about.

With the values loaded when the page opens, status comes out as Valid JSON ✓. Nudge one field at a time to see which one the answer is most sensitive to.

No. Disconnect from the internet and it still works; that is the simplest proof there is no server call.

Free for any use, personal or commercial.

It follows the standard definition for this operation, so the result matches what a reference implementation would give.

YoursTools Team
Product & Engineering

Builds and maintains every calculator on YoursTools.