Token Generator
Generate random tokens from the browser's crypto.getRandomValues, with length and character-set controls.
Random tokens from the browser's crypto API
Choose a length between 1 and 1024, select any combination of lower-case letters, upper-case letters, digits and symbols, and generate up to a hundred tokens at once. The avoid-ambiguous option drops 0, O, 1, l and I.
The characters come from crypto.getRandomValues with rejection sampling, so every character in the selected alphabet is equally likely and the output length is exact. The page does not store the tokens; copy one before leaving.
Length and alphabet size decide the search space. The page generates a string and makes no claim about whether a particular service will accept it.
This page generates random tokens from the browser's crypto.getRandomValues. Choose a length, pick any combination of lower-case, upper-case, digit and symbol sets, and generate up to a hundred tokens at once.
The page samples from the selected alphabet with rejection sampling: a byte is only used when it falls inside the largest exact multiple of the alphabet size, so every character is equally likely. The output length is exact, because a rejected byte is replaced rather than skipped.
The random source is the browser's cryptographic API, but this page makes no promise about a threat model. Length and character-set size are what decide the search space, and the tokens are shown in the page only — nothing is stored or sent.
Length, alphabet and the size of the space
Adding a character set increases the alphabet, and each extra character in the length multiplies the number of possible tokens. The page prints no entropy number because such a number depends on how the token is used, not only on its shape.
The avoid-ambiguous option removes 0, O, 1, l and I. It is a readability choice: the strings are easier to read aloud and retype, and the alphabet is slightly smaller as a result.
- Length is limited to 1–1024 characters
- Count is limited to 1–100 tokens per press
- At least one character set must be selected
What a generated token does not guarantee
The page cannot tell you whether a token is suitable for a particular service, whether it will be accepted by a password policy, or whether the machine you are using is compromised. It generates characters and shows them.
Two presses produce different tokens, but the page does not keep a history, so a closed tab loses them. Copy a token before leaving, and treat anything shown on screen as visible to anyone who can see the screen.
How to use the length and sets
Set Length from 1 to 1024 and How many from 1 to 100, tick the character sets to include, lower-case, upper-case, digits and symbols, optionally Avoid 0, O, 1, l and I for readability, then press Generate. At least one set must be selected; the page samples with rejection so every character is equally likely.
Copy the tokens at once: closing the tab loses them because the page keeps no history. Longer is not automatically stronger; the search space is length times the size of the chosen alphabet.
What to Expect
Best for
- Generating an API key, salt or one-time secret
- Making a batch of test tokens with a known shape
- Producing readable identifiers when ambiguity matters
Not ideal for
- Storing or managing the secrets after generation
- Guaranteeing a service will accept the format
- Deriving a key from a password
What this tool keeps
- Exactly the requested length, with no truncation
- An equal chance for every character in the chosen alphabet
- The tokens on screen until the page is reloaded
What may need cleanup
- A token that a target service rejects for its own policy reasons
- A length or count outside 1–1024 / 1–100, which is refused
- A missing character set, which stops generation with a message
Common errors
- Assuming a short token is strong because the source is cryptographic
- Leaving symbols off and expecting the same search space
- Closing the tab before copying the token
Example use cases
- Creating a test fixture token
- Generating a one-off API secret
- Producing readable codes for a manual process
Sample input
A length of 32 with lower-case, upper-case and digit sets selected.
Sample output
One 32-character token drawn only from those three sets.
Who this is for
- Developers making a test credential
- Anyone who needs a random string without an account
- Operators producing a readable one-time code
Frequently asked questions
Where does the randomness come from?
From the browser's crypto.getRandomValues, which fills a byte array with cryptographically strong values. The page does not call a server and does not store what it generates.
Does a longer token always mean a stronger one?
No. Strength depends on both length and the size of the selected character set; 64 characters chosen from a tiny set can be easier to guess than 16 from the full set.
Why exclude 0, O, 1, l and I?
They are read aloud and copied by hand as other characters. Excluding them shrinks the alphabet slightly, which is why the option is off until you choose it.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.