Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Generate a random string of any length from a custom character set.
Generating a string...
This tool generates a random string of any length, drawing from either the default alphanumeric character set (A-Z, a-z, 0-9) or a custom character set you specify -- useful whenever you need random text that isn't structured as a UUID or password specifically.
Set a length and, optionally, a custom character set. Click Generate for a fresh random string.
Each character position independently draws a uniformly random character from the specified character set, using the Web Crypto API's cryptographically strong random source.
For an API-key-shaped random token with a prefix, see the API Key Generator. For a cryptographically strong password specifically, use the Password Generator.
The Character Set field is treated as a list of individual characters, and each position in the output is chosen independently from that list. The default is all uppercase letters, lowercase letters and digits, which is 62 characters. You can replace it with anything: type 0123456789 for numeric codes, ABCDEF0123456789 for hexadecimal-style strings, or a short set such as ABCDEFGHJKMNPQRSTUVWXYZ23456789 to avoid look-alike characters like the letter O and the digit 0. Smaller sets are easier to read aloud but need more length to stay hard to guess.
Because the tool picks a random position in the text you typed, a character that appears several times has a proportionally higher chance of being chosen. If your set is aab, the letter a is twice as likely as b. This can be used deliberately to weight results, but if you want each symbol equally likely, list each one only once. There is no de-duplication step, so cleaning the set is your responsibility.
Possible strings = (number of characters in the set) ^ length. A set of 62 at length 12 gives 62^12 possibilities.
Suppose you want eight-character invite codes that people can type from a printed card. Set the length to 8 and enter a character set of uppercase letters and digits without the confusing characters 0, O, 1, I and L. That leaves 31 usable characters, so there are about 850 billion possible codes (31 to the eighth power). Generate several times to get a batch, copy each, and record them somewhere safe, since the tool does not remember previous results. Before using codes in a real system, check for duplicates in your database, because random independent draws can collide.
The randomness comes from the browser cryptographic source, so the strings suit tokens, test data and identifiers. Whether a given string is appropriate as a real security credential depends on your application and threat model, which is a decision for your security team or documentation.
Yes -- enter any character set (e.g. "0123456789ABCDEF" for hex) and the generator draws only from those characters.
Up to 500 characters, more than enough for any practical random-string use case; very long strings still generate instantly.
The Password Generator guarantees at least one character from each selected category (upper/lower/digit/symbol) and reports entropy; this tool draws freely from any custom character set without that guarantee, suited to non-password random text.
If a character appears more than once in your character set, it has a proportionally higher chance of being picked. List each character only once for an even distribution.
The length field allows up to 500 characters in a single string.
Yes. Simply leave them out of the Character Set field. Only characters you list are used.
Some emoji are stored as two code units and the tool picks single units, so a pair can be split. Use standard letters, digits and punctuation.
Reference: MDN Web Docs