FormatterHQ

Validators

Check JSON, XML, YAML, TOML, HTML, CSS and JavaScript for syntax errors, verify password hashes and run Luhn checks on test card numbers.

Bcrypt Hash Checker Check whether a password matches a bcrypt hash, like PHP password_verify, entirely in your browser. Color Contrast Checker (WCAG) Check the WCAG 2 contrast ratio of text and background colours for AA and AAA, preview it live and get the closest passing colour. Content Security Policy Evaluator Parse a Content-Security-Policy header and flag risky directives such as unsafe-inline, wildcards, missing object-src and base-uri. Credit Card Validator Check credit card numbers with the Luhn algorithm, detect Visa, Mastercard, Amex and more, and verify length. Runs 100% locally. CSS Validator Validate CSS online: find unclosed braces, missing semicolons and other syntax errors. Email Address Validator Check email address syntax in bulk and flag typos in popular domains, disposable providers, role accounts and duplicates. HTML Validator Validate HTML markup online and find unclosed, mismatched or malformed tags. IBAN Validator Validate IBANs for 80+ countries with the MOD-97 checksum and country length rules, and see bank code and account parts. ISBN Validator & Converter Validate ISBN-10 and ISBN-13 check digits and convert between the two formats, one or many at a time. JavaScript Validator Check JavaScript for syntax errors online and find the exact line and column of each problem. JSON Fixer & Repair Fix broken JSON automatically: add missing quotes, commas and brackets, remove comments and trailing commas, and convert Python literals. JSON Formatter Format, beautify and validate JSON online. Pretty print minified JSON with 2, 3, 4 space or tab indentation and pinpoint syntax errors. JSON Schema Validator Validate JSON against a JSON Schema (draft-07, 2019-09, 2020-12) with Ajv and get every error with its path and rule. JSON Validator Validate JSON online and find syntax errors fast. Get the exact line and column of each problem and fix broken JSON in one click. JSON5 Validator Validate JSON5 syntax online. Check config files with comments and trailing commas and get line and column for each error. JWT Verifier Verify a JWT signature with a shared secret, PEM public key, X.509 certificate or JWKS and check exp, nbf, iss and aud claims. Phone Number Validator & Formatter Validate phone numbers for 240+ regions and format them as E.164, international and national, with line type detection. Regex Patterns Library Copy-ready regex patterns for email, phone, URL, IP, dates, numbers, UUIDs, postal codes and passwords, each with examples and a live test box. Regex Tester Test JavaScript regular expressions live: highlight matches, inspect capture groups and named groups, try flags and preview replacements. SemVer Checker & Range Tester Validate, compare and sort semantic versions and test them against npm-style ranges like ^1.2.0, ~2.3 or >=1.0 <2. SQL Syntax Validator Check SQL syntax for MySQL, PostgreSQL, SQLite, SQL Server, BigQuery and more; pinpoint the line and column of errors. TOML Validator Validate TOML files online against the TOML 1.0 spec. Find syntax errors by line and column and see the parsed data as JSON. UUID Validator & Decoder Validate UUIDs/GUIDs and decode version, variant and embedded timestamps for v1, v6 and v7 — many at once. WordPress Password Hash Checker Check if a password matches a WordPress user_pass hash ($wp$ bcrypt, $P$ phpass or legacy MD5). XML Formatter Format and beautify XML online with custom indentation. Validate structure, keep comments and CDATA, and spot errors by line. XML Validator Validate XML online for well-formedness. Find unclosed tags, bad nesting and invalid characters with exact line and column numbers. YAML Formatter Format YAML online with consistent indentation while keeping comments. Validate syntax and see the exact line of any error. YAML Validator Validate YAML syntax online. Catch bad indentation, duplicate keys and invalid values with exact line and column numbers.

Catch errors before they reach production

A missing comma in a JSON config, an unclosed tag in an XML feed or a tab in a YAML file can break a deployment or an integration in ways that are hard to trace. Validators parse your input with a strict parser and tell you exactly where the problem is, usually with a line and column number. This category gathers the validators for the formats developers edit every day.

Which validator do you need?

Syntax, schema and semantics

It helps to know what kind of check you are running:

  • Syntax – is the file parseable at all? This is what these validators check.
  • Schema – does it contain the right fields and types? That needs a JSON Schema, XSD or tool-specific schema (such as the Kubernetes API) in addition to the syntax check.
  • Semantics – do the values make sense? Only your application or tests can tell.

A syntax check is the fast first step: most broken configs fail there, and the error position points straight at the typo.

Reading error messages

Parsers report where they noticed a problem, which is sometimes just after the real mistake. If line 42 is reported, look at line 41 too: a missing comma or quote at the end of the previous line is a classic cause. For JSON, an "unexpected token" at the very end often means a bracket was never closed.

Validators in your workflow

Online validators are ideal for a quick check of a single file or snippet. For projects, the same checks belong in your editor (as linting) and in continuous integration, so a broken file never gets merged. When a pipeline fails with a cryptic parse error, pasting the file here usually shows the exact position much faster.

Good habits

  • Validate generated files in your CI pipeline, not just by hand.
  • Prefer serializers over string concatenation when producing JSON or XML.
  • Keep formatting consistent with the matching formatter, which makes errors easier to spot.
  • Validation runs in your browser, so configuration with internal details stays private.

Frequently asked questions

What does a validator check?
It checks syntax: whether the input follows the rules of the format and can be parsed. Errors are reported with their position so you can fix them quickly.
Does valid JSON mean my API request is correct?
Not necessarily. Valid JSON is syntactically correct, but the API may still expect specific fields and types, which only a schema or the API itself can confirm.
Why is the error reported on the wrong line?
Parsers report where they detect the problem, which can be just after the actual mistake. Check the line before the reported one for missing commas, quotes or brackets.
Is the credit card validator for checking real cards?
No. It is a developer tool that checks the format of test card numbers with the Luhn algorithm. It never contacts a bank and cannot tell whether a card exists.