Random Token Generator
Generate random token using the options shown.
About Random Token Generator
Developers need random strings for many small jobs, such as a session secret in a local .env file, a CSRF secret, a test fixture value or a one-off shared secret between two services. This tool produces one long random string quickly, so you do not have to invent one by hand.
How it works
The token is built with the same routine as the password generator. Each character comes from crypto.getRandomValues, a cryptographically secure source, mapped onto a 67-character set. The set contains letters and digits without I, O, l, 0 and 1, plus the symbols ! @ # $ % ^ & * _ and -. The default length is 32, and any value is limited to 4 to 128 characters. There is no hex, Base64 or URL-safe option, so tokens can contain characters like & and #. Nothing is stored.
How to use Random Token Generator
- Complete the available fields: Length. Use the field labels and examples shown in the workspace.
- Select “Generate” and check the result before copying or downloading it.
Worked example
At the default length of 32 you get one string such as Gq7!mZ2_kT9wPx#4bNr8eY%vC3hU6sJd. That string is illustrative only, since each run differs. A 32-character token from 67 possible characters carries about 194 bits of randomness, more than enough for typical secrets.
Tips for a better result
- If the token will appear in a URL, query string or shell command, quote or URL-encode it, because characters like &, # and % have special meaning there.
- Wrap the value in quotes when you put it in a .env file. Some loaders treat # as the start of a comment.
- When a system requires hex-only or alphanumeric secrets, use your platform's own generator, because this tool always includes symbols.
Frequently asked questions
How is this different from the password generator?
The randomness and character set are the same as the password generator's full set, but there is no character set selector, and the default length is 32. It is aimed at machine secrets rather than human passwords.
Can I get a hex or Base64 token?
No. The output always draws from letters, digits and ten symbols. For hex or URL-safe Base64, use your language's crypto library, such as a random bytes function, and encode the result.
Is the token sent to a server?
No. It is generated in your browser and is not logged or stored by the page. Copy it straight into your secret store or configuration.
What to check
Local checks are not a security audit or live malware scan. Do not enter active passwords, API keys or other secrets.
Read the Privacy Policy for information about local processing, connected services and advertising.