UTILS.
Private by default
🔑

API Token Generator

Generate secure random tokens or API keys in hex, base62 or base64url.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
— output appears here —

About this tool

Generate cryptographically random tokens in your browser using crypto.getRandomValues, in your choice of format and length.

Pick a length from 1 to 512, a format and a count from 1 to 100; values outside the limits are corrected to the nearest allowed one. Length is characters, not bytes. Bytes come from crypto.getRandomValues; Math.random is not used. Hex uses 16 characters (4 bits each, so 32 characters hold 128 bits). Base62 uses a-z, A-Z and 0-9 (about 5.95 bits each) and discards bytes that would skew the distribution. Base64url uses 64 URL-safe characters (6 bits each) without padding.

Generate makes a fresh batch, one token per line, and Copy all copies the list. Changing a field does not regenerate until you press Generate.

Frequently asked questions

Are these tokens secure?
Yes — they use the browser's cryptographically secure random number generator, and nothing leaves your device.
What do the formats mean?
Hex uses 0-9a-f, base62 uses letters and digits, and base64url uses URL-safe Base64 without padding.
Is length counted in bytes or characters?
Characters. A length of 32 gives 32 characters in every format, which is 128 bits in hex and 192 bits in base64url.
Does the list update when I change a setting?
No. Press Generate; until then the tokens on screen keep their old settings.

More tools