Random Token Generator

Generate cryptographically random tokens, API keys, and secrets with a configurable length and character set. Runs entirely in your browser — nothing leaves your device.

Generated tokens

Generate a secure random token in your browser

Create cryptographically random tokens, API keys, session IDs, and other secrets with a configurable length and character set. Everything runs locally in your browser with a cryptographic RNG — the generated value never leaves your device or touches a server.

Character sets

Set a custom alphabet to draw from your own characters instead of a preset (duplicates are ignored). Use count to generate a whole batch at once.

The output shows each token plus its estimated entropy in bits (higher is stronger) and the size of the alphabet used.

Tips

FAQ

How long and how many tokens can I generate?

Length can be 1 to 4096 characters per token, and you can generate up to 1000 tokens in one batch. Values outside those ranges return an error rather than being silently clamped.

Are these tokens really random enough for secrets?

Yes — bytes come from the platform's cryptographic RNG (the same source as crypto.getRandomValues), and characters are picked with rejection sampling so every character of the alphabet is equally likely, even when the alphabet size isn't a power of two.

What are the rules for a custom alphabet?

Anything goes as long as there are at least 2 distinct characters — duplicates are removed automatically, and Unicode is fine. When the custom alphabet field is non-empty it fully replaces the charset preset. Example: BCDFGHJKMNPQRSTVWXYZ23456789 gives vowel-free voucher codes.

How is the entropy figure calculated?

Entropy = token length × log2(alphabet size). A 32-character hex token is 32 × 4 = 128 bits; 22 base64url characters give ~131 bits. If the number looks low, either lengthen the token or pick a larger alphabet.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool random-token-generator 'length=32'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/random-token-generator/?length=32&count=1&charset=hex&custom_chars=BCDFGHJKMNPQRSTVWXYZ23456789

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.