Username Validator
Type a username and pick a platform to check it against that platform's actual character, length and formatting rules.
About the Username Validator
Each platform enforces its own quiet rulebook for usernames: minimum and maximum length, which characters are allowed, and sometimes extra formatting rules like never starting or ending with a period. This tool runs your text through the documented rules for Instagram, X/Twitter, TikTok, YouTube handles and Facebook, and tells you exactly which rule failed instead of just saying "invalid", so you know whether to shorten it, drop a character, or move a period.
One generic validator reads a rule table, rather than five separate hardcoded checkers
Each platform is defined as a data object listing its minimum and maximum length, an allowed-characters pattern, and a small set of optional flags β things like "no consecutive periods" or "must contain a letter" β that only some platforms need. A single validateUsername() function reads whichever flags happen to be set for the currently selected platform and checks only those. That structure means the actual validation logic is written once; adding support for a new platform in the future would just mean adding a new rule entry to the table, not writing a whole new validation function.
Checks run in a fixed order, so only one failure reason is ever shown at a time
When a username fails more than one rule at once, only the first failing check in the sequence is reported: empty check first, then disallowed characters, then too-short, then too-long, then the platform-specific formatting rules like consecutive or leading/trailing periods, and finally the "must contain a letter" rule last. That ordering is a deliberate choice β leading with the character-set check before length means a username with both a disallowed symbol and the wrong length gets told about the invalid character first, since fixing that is usually the more fundamental problem to address before worrying about trimming length.
Character checking counts by real character, not raw UTF-16 units
The invalid-character scan uses for (const ch of str), which iterates over actual Unicode code points rather than raw UTF-16 code units. That distinction matters for any username containing an emoji or other character built from a surrogate pair: a naive index-based loop would split such a character into two broken half-values and test each one separately, while this for...of approach correctly treats it as one single character when checking it against the allowed pattern.
YouTube's leading @ is stripped before anything else is checked
Since real YouTube handles are always displayed with a leading @ but that symbol isn't counted as part of the handle's actual length, the validator strips a leading @ from the input before running any other check when YouTube is selected. That means typing either @channelname or channelname validates identically β the length and character rules are always applied to the handle text alone, matching how YouTube's own handle length actually works.
The status box only fully hides on a completely empty field
The result box disappears when the username field is entirely empty, but typing even a single space character is enough to trigger a real validation attempt β and since a plain space isn't part of any platform's allowed character set, that shows up as a genuine FAIL rather than being treated as blank. Only a truly empty string skips validation altogether and clears the status box.
Facebook's "must contain a letter" rule is the only one of its kind here
Facebook is the sole platform in this tool's rule table with a requireLetter flag, which checks that at least one A-Z letter appears somewhere in the username, rejecting an entry made up purely of numbers and periods even if it otherwise fits the length and character-set rules. None of the other four platforms enforce that particular restriction, which is exactly the kind of platform-specific quirk a single generic character-set-and-length check would miss if it weren't handled as its own explicit rule.
Frequently Asked Questions
Does passing this check guarantee the username is actually available on the platform?
No. This tool only checks formatting rules β length, allowed characters, and structural rules like leading periods. It has no way to check whether that exact username is already taken by another account.
Why does it only show me one error when my username has multiple problems?
Checks run in a fixed sequence, and only the first one that fails is reported, starting with disallowed characters, then length, then platform-specific formatting rules. Fixing that issue and re-checking will reveal the next problem if there is one.
Do I need to type the @ symbol for the YouTube handle check?
No, either way works. Any leading @ is automatically stripped before the handle is validated, since it isn't counted as part of the actual handle length on YouTube.
Why does a username with periods fail the X/Twitter check but pass on Instagram?
X/Twitter's real username rules don't allow periods at all, while Instagram allows them with some restrictions (no two in a row, and never at the start or end) β this tool applies each platform's actual documented rules rather than one universal rule set.
Does typing a space count as an empty username?
No. Only a completely empty field is treated as blank. A single space is still run through validation and will fail, since spaces aren't an allowed character on any of the supported platforms.
Is my typed username sent anywhere to check it?
No. Validation runs entirely in your browser against a local set of documented platform rules β nothing is transmitted to any server or platform API.