1001Ferramentas
🔑Security

Secure Token Generator

Generate cryptographically secure random tokens (alphanumeric, hex or base64) in your browser. Ideal for API keys, secrets, passwords and unique IDs.



  

Thirty-two random bytes in three encodings

You need an API key or a session secret, and the temptation is Math.random, a recycled UUID or mashing the keyboard. This page pulls 32 bytes from the browser's cryptographic generator, crypto.getRandomValues, and prints them in three representations at once. One button, one output block, no configuration fields at all.

The detail people miss: those three lines are not three tokens. They are the same 32 bytes written differently — 64 hex characters, one base64 line with the equals padding stripped, and 32 alphanumeric characters. Pick one and ignore the rest. There is no way to request another length or another character set; the block is recomputed when the page loads and on every click of the generate button.

Two concrete caveats. The line labelled base64url is really standard base64 with padding removed: the + and / characters are still there and were never swapped for - and _, so check it before dropping the value into a URL or a filename. The alphanumeric line uses byte modulo 62, which slightly favours the first eight symbols of the alphabet; harmless in a 32-character token, but do not copy that trick as a general random source. There is no copy button either, so select and copy by hand.

Frequently asked questions

Are the three lines independent tokens?
No. They are one 32-byte sequence in three encodings. Using two of them in the same system buys you exactly nothing in security terms.
Can I choose the token length?
No. It is fixed at 32 bytes, which is 256 bits of entropy — comfortably more than an API key, a session secret or an opaque identifier needs.
Is it safe to generate a production secret here?
The generator is cryptographic and nothing leaves the page, so technically yes. For production, still prefer generating on the machine that will hold the value, with openssl rand -hex 32.

Related Tools