Validate JSON against JSON Schema online

How online JSON Schema validation works, what it checks and what it leaves untouched, where pasted JSON breaks, and when a local validator is the better choice.

An online JSON Schema validator lets you paste a JSON document and a schema, then reports whether the document meets the schema's rules. It is quick and needs no setup, which suits one-off checks, learning the schema language and debugging a single payload. This review covers what validation does and does not do to your text, where copying and pasting introduces errors, and when a local tool is the better choice. It is based on general, verifiable behavior of JSON and JSON Schema, not on tests of any particular website.

Is an online validator suitable for your use?

An online validator is a good fit when the data is not sensitive, the check is occasional and you want readable error messages without installing anything. The main benefit is speed. The deciding tradeoff is that you send or expose your data to a tool whose draft support, format handling and data practices you usually cannot verify from its interface.

Use a local library or command-line validator instead when any of these apply:

  • The JSON contains credentials, personal data or proprietary content.
  • Validation must be repeatable, for example in tests or a CI pipeline.
  • The schema references other schema files through $ref and those files are not publicly reachable.
  • You need a specific JSON Schema draft and specific format-checking behavior, and the online tool does not document which it uses.
  • The documents are large or contain very large integers or high-precision decimals.

What validation changes, and what it does not

Validation does not transform your text. A validator parses the JSON into data values, checks those values against the schema's keywords and reports pass or fail, usually with the location and reason for each failure. Your original characters stay as they are. This differs from text transformations such as reversal, mirrored glyphs or Unicode "font" substitution, which change stored characters or only how they look. None of those mechanisms apply here.

Many online validators also have a format, beautify or minify button. That feature does rewrite the text. Pretty-printing and minifying are meant to change only whitespace between tokens, so the parsed data stays the same. Re-serialization can still change other details: key order, how numbers are written (for example 1.0 becoming 1, or exponent notation), and whether non-ASCII characters appear literally or as escape sequences. If byte-for-byte fidelity matters, keep your original and validate it rather than the reformatted copy.

How schema checks work: a worked example

The schema below requires an object with an integer id of at least 1, a string email and an optional array of string tags. It forbids any other properties.

{
  "type": "object",
  "required": ["id", "email"],
  "properties": {
    "id": { "type": "integer", "minimum": 1 },
    "email": { "type": "string", "format": "email" },
    "tags": { "type": "array", "items": { "type": "string" } }
  },
  "additionalProperties": false
}

Here is a document to check against it:

{
  "id": "42",
  "email": "not-an-email",
  "tags": ["a", 3],
  "nickname": "x"
}

A conforming validator should report three definite failures:

  • id is the string "42", not an integer. JSON Schema does not coerce types, so quoted numbers fail a type: integer check.
  • The second item of tags (location /tags/1 in JSON Pointer notation) is the number 3, not a string.
  • nickname is not listed under properties, and additionalProperties is false.

Whether "not-an-email" fails depends on the validator. In drafts 2019-09 and 2020-12, format is an annotation by default, and enforcing it is an optional setting. Some validators enforce formats and others ignore them. If one tool accepts this document and another rejects it, check how each handles format before assuming either one is wrong.

Draft version matters in other ways too. Keywords and their behavior changed across draft-04, draft-06, draft-07, 2019-09 and 2020-12. Examples include how exclusiveMinimum is written, the move from definitions to $defs, and how items handles tuple-style arrays. A schema can declare its draft with the $schema keyword. Without it, a validator falls back to its own default, which may not be the draft you wrote for.

Will the JSON survive copying and pasting?

Most failures in online validation happen before the schema is checked, because the pasted text is not valid JSON. Common causes:

  • Curly "smart" quotes added by word processors, note apps or chat tools. JSON accepts only the straight double quote.
  • Trailing commas and comments. Standard JSON allows neither, though JSONC and JSON5 do. A strict validator will reject them.
  • Non-breaking spaces or other Unicode spaces between tokens, often picked up from web pages. JSON allows only space, tab, line feed and carriage return as whitespace.
  • A byte-order mark at the start of the text. Some parsers accept it and others reject it.
  • Lookalike characters in key names, such as fullwidth or stylized Unicode letters. The text may look right but will not match the property names in the schema.

Some problems pass validation without being noticed. If an object repeats a key, many parsers silently keep only the last value, so the validator checks data that differs from what you see. Very large integers can lose precision if the tool parses with standard JavaScript numbers, which is common for browser-based tools. Invisible bidirectional control characters inside string values are valid JSON and will pass validation, but they can make the value display differently from its stored order. If any of these could matter, inspect the raw text with a tool that shows invisible characters.

When you share results, plain text is the safer format. Copy the error list as text, including the JSON Pointer paths, rather than a screenshot. Text can be searched, pasted into an issue tracker and read by screen readers. Whether a particular online validator's editor and error panel work well with assistive technology was not tested for this review. Check that directly if it matters to you or your team.

Online versus local validation

Aspect | Online validator | Local library or CLI
Setup | None | Install a package or tool
Data exposure | Depends on the tool; often undocumented | Data stays on your machine
Draft and format control | Whatever the tool supports and documents | Configurable in most libraries
Resolving private $ref files | Often impractical | Supported via local file resolution in many libraries
Repeatability and automation | Manual | Scriptable and suitable for CI
Best for | Quick checks, learning, debugging one payload | Sensitive data, pipelines, large or complex schemas

Gaps in this review

No specific online validator was examined, so this review makes no claims about any tool's supported drafts, format enforcement, error wording, size limits, accessibility or data retention. A tool's appearance or marketing does not show whether it processes data only in your browser or sends it to a server. Check its documentation or policy, or watch its network activity, before pasting anything sensitive. Verify the behavior described above, especially format handling and draft defaults, with the tool you plan to use.