randarium
Security

Secure Token Generator

Generate one or many cryptographically random tokens for API keys, session tokens, CSRF tokens, and similar secrets. Choose hex, base64, base64url, URL-safe, alphanumeric, or a custom character set, and optionally prepend a prefix such as sk_.

Also known as: token generator · api token generator · secret token · bearer token

secure · crypto RNG

Private by design. Your token is generated locally and never saved, uploaded, or shared — only your settings can be, and only when you choose.

Presets

Hex, alphanumeric, URL-safe, and custom modes use output characters. Base64 and base64url use random bytes before encoding.

Optional text to prepend to every token, such as sk_ or tok_.

PEM wraps random bytes in standard armor for test fixtures — not a real key.

Output

No output yet — set your options and hit .
About this tool, tips & examples

What it does

The Secure Token Generator creates cryptographically random tokens locally in your browser. You can generate one token or a batch, choose hex, base64, base64url, alphanumeric, URL-safe, or a custom character set, and prepend a prefix such as sk_ when you need a recognizable token format.

Common use cases

  • API keys and bearer tokens.
  • Session tokens and cookie secrets.
  • CSRF tokens and one-time secret values.
  • Internal tooling that needs secure random identifiers.

Settings

  • Length — in hex, alphanumeric, URL-safe, and custom modes this is the number of output characters. In base64 and base64url modes it is the number of random bytes generated before encoding.
  • How many — generate a single token or a batch.
  • Mode — choose hex, base64, base64url, alphanumeric, URL-safe, or a custom character set.
  • Custom character set — required only in custom mode.
  • Prefix — optional text added before every token, such as sk_ or csrf_.

Privacy note

Everything runs locally in your browser using cryptographic randomness from the Web Crypto API. Generated tokens are never uploaded or sent to a server, are never saved automatically, and are never included in share links. This is a secure generator, so there is no seed and no reproducible mode.

FAQ

Why is there no seed option? Secure tokens must not be reproducible. This generator always uses local secure randomness, so it never exposes a seed control.

What mode should I choose? Use hex when you want simple lowercase tokens, base64 or base64url when you want compact byte-oriented output, alphanumeric or URL-safe when you need restricted character sets, and custom when another system requires an exact alphabet.

Why does it warn about short tokens? Tokens backed by less than roughly 128 bits of randomness provide less security margin. The warning helps you avoid weak lengths for secrets such as API keys, session tokens, and CSRF tokens.