Cryonel

JSON Validator & Formatter

Paste your JSON below to see syntax errors instantly and pretty-print it with 2-space indentation in one click. Everything runs in your browser — nothing is sent to a server.

How to use it

  1. Paste JSON into the input, drop a local file onto the editor, or choose Load Example.
  2. Select Validate & Format or press Ctrl/ + Enter.
  3. Read the line, column, and parser explanation if validation fails. Correct the input and run it again.
  4. Copy or download the formatted result, or send it directly to the JSON/YAML Converter.

Minify validates the same input but removes indentation and unnecessary whitespace. This is useful when a compact payload is needed for a fixture, environment variable, or request body. Formatting and minifying change whitespace only; they do not rename keys, reorder arrays, or convert values.

JSON validation example

This valid input contains a string, boolean, array, and nested object:

{
  "user": {
    "id": 42,
    "email": "ada@example.com"
  },
  "roles": ["admin", "editor"],
  "active": true
}

The formatted output preserves those values while applying consistent two-space indentation. If the comma after the email property were missing, the validator would identify the failing line and column instead of returning a generic “Invalid JSON” message.

What this validator checks

The tool uses the browser’s strict JSON parser. It checks quotation marks, commas, colons, brackets, braces, escape sequences, numbers, literals, and the overall document structure. A successful result means the text is syntactically valid JSON. It does not prove that the document matches an application-specific contract. Use a JSON Schema validator when fields, types, formats, or required properties must follow a schema.

Duplicate object keys are another important limitation. Many parsers accept them and keep the last value, so syntactic validation alone may not expose an accidental duplicate. Review security-sensitive configuration and API payloads for duplicate keys before using them in production.

Common JSON errors

If the source resembles a JavaScript object, JSON5 file, or Python dictionary, try JSON Repair first. It applies a limited set of safe syntax corrections and then validates the result.

When to use an online JSON validator

Validation is useful before sending an API request, committing a configuration file, importing a fixture, debugging a webhook, or comparing two responses. Formatting also makes deeply nested data easier to review during code review and incident investigation. Cryonel processes the text inside the current browser tab, so the tool can be used for private payloads without uploading them to Cryonel. The browser still needs enough memory for the document; very large files may slow or freeze the tab, so keep an original copy before working with them.

Frequently Asked Questions

How do I validate large JSON files?

Just copy the file's contents into the box. Everything happens in your browser with no upload to a server, so it's safe for sensitive data too.

Can I use comments inside JSON?

No, standard JSON doesn't support comments. Files with comments (JSONC) need to have them stripped first.

Why does a trailing comma cause an error?

The JSON spec forbids a comma after the last element — unlike JavaScript object literals, JSON doesn't allow it.

Guides

Related Tools