Email syntax: the standard vs a practical check
The formal email address syntax in RFC 5322 is far broader than most people expect. It allows quoted local parts with spaces, such as "john doe"@example.com, and many special characters. RFC 5321 limits the part before the @ to 64 characters and the whole address in practice to 254.
This tool runs a practical format check rather than full RFC 5322 parsing. It requires exactly one @, a local part of up to 64 characters made of letters, digits, dots and the usual symbols such as + and _, with no leading, trailing or double dots, and a domain of at least two dot-separated labels. Each label must be letters, digits or hyphens, may not start or end with a hyphen, and the last label must be a real-looking top-level domain such as com or in. So john..doe@example.com, .john@example.com and a@b..c are rejected. It also rejects some addresses that are technically valid but rare, such as quoted local parts, user@localhost and addresses with non-ASCII characters.
For signup forms, a simple syntax check followed by a confirmation email is more reliable than any regular expression, because only delivery proves an address works.
URL validation with the browser's parser
URL mode passes your input to the browser's URL constructor, which follows the WHATWG URL Standard used by all modern browsers, and then accepts only http:// and https:// URLs with a host name. Anything else, including ftp:, mailto: and javascript: links, and bare domains without a scheme, is reported as invalid.
The scheme check matters because parsable does not mean safe: mailto:a@b.c and javascript:alert(1) are both valid URLs to the parser. If you accept URLs from users, check the scheme against an allow list in the same way. The parser also rejects hosts containing spaces and impossible IP addresses such as http://999.1.1.1.
IPv4 rules and the leading-zero trap
An IPv4 address is four decimal numbers from 0 to 255 separated by dots. The check here enforces that range and rejects leading zeros, so 010.0.0.1 and 192.168.01.1 fail while 10.0.0.1 passes.
That matters because some older parsers, including the classic inet_aton function, read a leading zero as octal, turning 010 into 8 and the address into 8.0.0.1. Inconsistent handling has caused real access-control bugs, which is why this check rejects leading zeros instead of guessing which reading was meant. The check does not cover IPv6, CIDR notation such as /24, or ports.
How the Luhn checksum works
The Luhn algorithm, defined in ISO/IEC 7812 for card numbers, starts from the rightmost digit and doubles every second digit moving left. Any doubled result above 9 has 9 subtracted. If the sum of all digits is divisible by 10, the number passes.
For the common test number 4111 1111 1111 1111, the eight doubled positions give 8 for the leading 4 and 2 for each of the other seven 1s, totalling 22, and the eight undoubled 1s add 8, for a sum of 30. Change the last digit to 2 and the sum becomes 31, which fails.
Luhn catches every single-digit error and most swaps of adjacent digits, except 09 and 90. It is also used for IMEI numbers and other IDs, so the tool runs the checksum on any input of two or more digits; the textbook example 79927398713 passes. The result then says separately whether the length falls in the 13 to 19 digits used by payment cards. All four checks run in your browser and nothing you type is sent to a server.
Universal Format Validator: frequently asked questions
Why does my email validation accept addresses that bounce?
Syntax validation only checks the shape of the text. A well-formed address can still have a misspelled domain, a mailbox that does not exist or a full inbox, and only sending a message confirms it.
Is javascript: a valid URL?
Syntactically yes, because the URL Standard accepts any scheme, but this tool reports it as invalid since it accepts only http and https. Applications that display user-supplied links should apply the same kind of scheme allow list.
Which test card numbers pass the Luhn check?
Payment providers publish test numbers that pass Luhn, such as 4111 1111 1111 1111 and 4242 4242 4242 4242 for Visa and 5555 5555 5555 4444 for Mastercard. They work only in sandbox environments and cannot be charged.
Are private addresses like 192.168.1.1 valid IPv4 addresses?
Yes. Ranges such as 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks but are syntactically ordinary addresses, so they pass. Whether they are reachable depends on the network, not the format.
Does the card check ignore spaces and dashes?
Yes. Spaces and dashes are removed before checking, so 4111-1111-1111-1111 and 4111 1111 1111 1111 both pass. Any other character, including letters, makes the input invalid, so a string with stray letters around a valid number is rejected.