Secure Token Generator
| Format | Recommended use |
|---|---|
| Hex | Keys, configuration and hexadecimal data |
| Base64 | APIs and binary transfers |
| Base64URL | URLs, Cookies and JWTs |
Hex, Base64 and Base64URL
How does the secure Token generator work?
Choose a Token format
Hex represents random bytes using hexadecimal characters and is useful for configuration files, key material, and scenarios that require a fixed character set. Base64 provides a more compact representation of binary random data and is suitable for many API and data-transfer scenarios. Base64URL uses URL-safe characters and is suitable for URLs, cookies, and JWT-related use cases.
Choose the random byte length
The amount of secure random data is configured in bytes. Available sizes are 16 bytes (128 bits), 24 bytes (192 bits), 32 bytes (256 bits), 48 bytes (384 bits), and 64 bytes (512 bits), with 32 bytes as the default. When 32 bytes of random data are encoded as Hex, the result is 64 characters. Standard Base64 normally produces 44 characters.
Base64 padding
Base64 and Base64URL can independently be configured to retain or remove trailing equals-sign padding. Standard Base64 keeps padding by default, while Base64URL removes it by default, which is often more convenient for URLs, cookies, and JWT-related values.
Secure random source
Tokens are generated from random bytes provided by the browser's crypto.getRandomValues() API. The tool does not use Math.random(), timestamps, or predictable combinations such as usernames and timestamps. If the browser does not support secure random numbers, the tool displays an error.
Batch generation and result operations
Up to 50 Tokens can be generated in one run, with independent random data for each result. When the format, byte length, quantity, or Base64 padding option changes, existing results are invalidated and new results are created only after clicking Generate or Regenerate. Results support individual copy, copy-all, and TXT export.
Security tips
Tokens are sensitive credentials. After generation, copy them immediately and store them securely. Do not publish real Tokens on public pages, in source-code repositories, or in chat history. This tool does not upload or save generated results, and refreshing the page clears the current results.
What is a secure Token?
- Supports Hex, Base64, and Base64URL formats, with Base64URL suitable for URLs, cookies, and JWT-related values
- Supports 16, 24, 32, 48, and 64 random bytes, with 32 bytes or 256 bits as the default
- 32 bytes of random data become 64 Hex characters and normally 44 characters when encoded with standard Base64
- Base64 and Base64URL can independently retain or remove trailing = padding for different format requirements
- Uses browser crypto.getRandomValues() and does not rely on Math.random or timestamps as predictable random sources
- Generates up to 50 independent results per run with copy and TXT export, without uploading or storing generated Tokens