What is the String Validator?

The String Validator checks whether a piece of text is a valid value of a given kind: an email address, a URL, an IP address, a credit card number, a date, a postal code and much more. It runs the validators of validator.js, an open-source JavaScript library that many websites and servers check their form input with, so you get the same answer as the code that receives your data.

Tool description

Type or paste a value, and the result appears as you type: green when the value is valid, red when it isn't. The String Validator has a Validator menu with every validator of the library. Each validator also has a page of its own, which checks just that kind of value.

Where a validator has options, they appear as settings under the field and change the rules it checks by. For example, a URL can be required to start with a protocol, a postal code or phone number is checked against the rules of the country you pick, and the letters-only check uses the alphabet of the language you pick.

Validators of formats, such as email addresses and dates, ignore spaces and line breaks around the value, since copied text often has them. Text checks, such as the ASCII and lowercase checks, look at every character as typed, spaces included.

Everything happens right in your browser, so nothing you type is sent anywhere.

Validators

Validator What it checks
Email Validator An email address, optionally with a display name or an IP address as the domain
URL Validator A web address, with the protocols you allow
FQDN Validator A fully qualified domain name
IP Address Validator An IPv4 or IPv6 address
CIDR Validator An IP address range in CIDR notation
MAC Address Validator A MAC address, with or without separators
Port Number Validator A TCP or UDP port number
Data URI Validator A data URI, such as an image embedded in a web page
Magnet Link Validator A magnet link
Mailto Link Validator A mailto link with its email addresses
MIME Type Validator A media type such as text/html
Slug Validator A URL slug of lowercase words joined by hyphens
JWT Validator The structure of a JSON Web Token
JSON validator JSON text
UUID Validator A UUID of any or a given version
ULID Validator A ULID
MongoDB ObjectId Validator A MongoDB ObjectId
Semantic Version Validator A version number in the SemVer format
Hash Validator The length and characters of a hash made with the algorithm you pick
MD5 Hash Validator The format of an MD5 hash
Base32 Validator Base32 text, standard or Crockford's
Base58 Validator Base58 text, as in Bitcoin addresses
Base64 Validator Base64 text, standard or URL-safe, with or without padding
ASCII Checker Text that contains only ASCII characters
Letters Only Checker Text that contains only letters of an alphabet
Alphanumeric Checker Text that contains only letters and digits
Lowercase Checker Text without uppercase letters
Uppercase Checker Text without lowercase letters
Full-Width Character Checker Text that contains full-width characters
Half-Width Character Checker Text that contains half-width characters
Mixed-Width Text Checker Text that mixes full-width and half-width characters
Multibyte Character Checker Text that contains characters outside ASCII
Surrogate Pair Checker Text that contains surrogate pairs, such as emoji
Allowed Characters Checker Text made only of the characters you allow
Empty String Checker Text that is empty, or only white space if you choose
Allowed Values Checker A value from a list you enter
Substring Checker Text that contains a substring
String Equality Checker Two texts that are exactly the same
Regex tester Text that matches a regular expression
String Length Checker Text whose length in characters or bytes is within limits
Strong Password Checker A password with the length and kinds of characters you require
Numeric String Validator A number written with digits, optionally with a sign and decimals
Integer Validator A whole number, optionally within limits
Float Validator A floating-point number, optionally within limits
Decimal Number Validator A decimal number with the number of decimal places you allow
Hexadecimal Number Validator A hexadecimal number
Octal Number Validator An octal number
Divisibility Checker A number divisible by another
Boolean Validator A true or false value
Luhn number validator A number with a valid Luhn check digit
Date Validator A date in the format you pick
Time Validator A time in the 24-hour or 12-hour format
ISO 8601 Date Validator A date or date and time in the ISO 8601 format
RFC 3339 Date Validator A timestamp in the RFC 3339 format
Later Date Checker A date after another date or now
Earlier Date Checker A date before another date or now
Hex Color Validator A hex color code
RGB Color Validator A CSS rgb() or rgba() color
HSL Color Validator A CSS hsl() or hsla() color
Credit Card Number Validator A card number of any or a given card network
Currency Amount Validator An amount of money in the format you set
IBAN validator and parser An international bank account number
BIC Validator A BIC or SWIFT code
ABA Routing Number Validator A US bank routing number
ISIN Validator An international securities identification number
VAT Validator A VAT number of a given country
Tax ID Validator A tax identification number of a given country
Bitcoin Address Validator A Bitcoin address
Ethereum Address Validator An Ethereum address
Mobile Phone Number Validator A mobile phone number of any or a given country
Postal Code Validator A postal code of any or a given country
ID Card Number Validator An identity card number of any or a given country
Passport Number Validator A passport number of a given country
License Plate Validator A license plate of any or a given country
IMEI Checker A phone's IMEI number
Latitude and Longitude Validator A latitude and longitude, in decimal degrees or in degrees, minutes and seconds
EAN Validator An EAN barcode number
ISBN validator and parser A book's ISBN
ISSN Validator A serial publication's ISSN
ISRC Validator A sound recording's ISRC
Shipping Container Number Validator A container number with its ISO 6346 check digit
ISO 639-1 Language Code Validator A two-letter language code
ISO 15924 Script Code Validator A four-letter writing system code
ISO 3166-1 Alpha-2 Country Code Validator A two-letter country code
ISO 3166-1 Alpha-3 Country Code Validator A three-letter country code
ISO 3166-1 Numeric Country Code Validator A three-digit country code
ISO 4217 Currency Code Validator A three-letter currency code
Locale Code Validator A locale or language tag such as en-US

What a validator can and can't tell

A validator checks that a value has the right form: the right characters in the right places, and the check digit where the format has one, as card numbers, IBANs and ISBNs do. It can't tell whether the value actually exists or is in use. A valid email address may have no mailbox behind it, and a valid card number may belong to no card.

Rules that differ by country, such as those of postal codes, phone numbers and passports, are checked against the country you pick. With Any country, a value passes when it fits the rules of at least one country.

Features

  • Every validator of validator.js, each on a page of its own and all together in one menu
  • The validators' options as settings, such as countries, versions and formats
  • Results as you type, with no button to press
  • Runs in your browser, so nothing you type is sent anywhere