Token Generator

Cryptographically secure random tokens, API keys and UUIDs – generated in your browser, never sent anywhere.

Generated with crypto.getRandomValues() in your browser. Nothing is sent to a server, logged, or stored – reload the page and these are gone for good.

Random strings make useful test data alongside the phone number generator, and the url encoder makes one safe to drop into a link.

What each format is for

Format Alphabet Use it for
Random string Whatever you tick Passwords, shared secrets, anything with its own character rules.
Hexadecimal a–f 0–9 Signing keys, HMAC secrets, session IDs. 64 characters is 256 bits.
Base64url A–Z a–z 0–9 - _ Anything that travels in a URL or a filename. No escaping needed.
API key Base58, prefixed Public-facing keys. Drops 0, O, I and l, so nobody mistypes one off a screen.
UUID v4 Fixed Database keys, request IDs, idempotency keys. 122 bits of randomness.

How to generate a secure token

  1. Pick the format. If something else will read the token, its rules decide this – base64url for a URL, hex for a signing key, UUID for a database column. Only reach for a custom character set when nothing else applies.
  2. Set the length. Watch the entropy line under the buttons rather than the character count. It tells you what the token is actually worth.
  3. Generate. Ask for several at once if you are seeding an environment file or a set of test accounts.
  4. Copy it straight into where it belongs. Click a token to copy it, or download the batch as a text file. Do not paste a real secret into a chat, a ticket or a commit – that is how most of them leak.

How strong is strong enough?

Strength is not about mixing in a symbol. It is entropy: the number of guesses an attacker has to make, expressed in bits. Each extra bit doubles that number. The maths is length × log2(alphabet size), which is the figure this tool shows every time it generates.

Entropy Verdict Example
< 60 bits Not enough for a secret 10 lowercase characters
80 bits Fine for a session ID, thin for anything long-lived 20 hex characters
128 bits The standard for secrets and API keys 32 hex, or 22 base64url characters
256 bits Beyond anything brute force can reach 64 hex characters

This is why the old "weak / medium / strong" labels mislead: a 40-character lowercase token carries about 188 bits and is far stronger than a 12-character one full of symbols, which carries 78. Length beats character variety, every time.

Why the random source matters more than the length

Most browser token generators build their output with Math.random(). It is fast and it looks random, but it is a plain pseudo-random generator: its internal state can be recovered from a short run of outputs, after which every value it will ever produce is predictable. A 256-bit token from a predictable source is worth nothing at all.

This tool uses crypto.getRandomValues(), the browser's cryptographically secure generator, seeded by the operating system. It also uses rejection sampling rather than the usual byte % length: 256 is not a multiple of 62, so a plain modulo makes the first few characters of an alphabet about 1.3 times more likely than the rest. Bytes that would skew the result are discarded and redrawn.

Everything happens in your browser. No token is sent to a server, written to a log, or saved anywhere – there is no request to make. You can check: open your browser's network tab and press Generate. Nothing goes out.

Frequently asked questions

Yes. They come from crypto.getRandomValues(), the same cryptographically secure source your operating system provides, with the modulo bias removed. At 128 bits or more they are suitable for API keys, signing secrets and session identifiers.

No. Generation happens entirely in your browser and there is no request to make – you can confirm it in the network tab. Nothing is logged, nothing is saved, and reloading the page discards everything.

Aim for at least 128 bits of entropy: 32 hexadecimal characters, or 22 base64url ones. Most providers issue rather more, and add a readable prefix such as sk_live_ so a leaked key can be recognised and revoked without anyone having to identify it by eye.

No, and no tool can. A Discord bot token is issued by Discord and tied to an application on your account – it is not a random string that happens to be the right shape. You get one from the Discord Developer Portal, under your application's Bot tab. Anything claiming to generate or find Discord tokens is either useless or is trying to take yours.

A token is a secret a machine presents to prove it may do something. A UUID is an identifier meant to be unique rather than secret – fine in a URL or a log, not as a password. A password is a secret a person has to type or remember, which is the only reason to trade entropy for readability. Use a UUID to name things and a token to authorise them.

Not in any practical sense. At 128 bits there are more possible tokens than there are atoms in a small mountain; you would need to generate billions per second for longer than the universe has existed before a collision became likely. Below about 64 bits, collisions stop being theoretical – another reason to watch the entropy figure rather than the length.

Need other placeholder data? The phone number generator makes numbers that reach nobody, and the username generator fills in the rest of a test account.