Token Generator
The Token Generator creates cryptographically random tokens for CSRF, password reset and API keys, using the browser crypto API.
Key Features
- Configurable length
- Hex or base64url
- Bulk generation
- Local randomness
Use Cases
- Issue an API key
- Create a CSRF token
- Generate a reset code
- Teach token design
How to Use
- Set length and format
- Generate
- Copy the token
Practical Tips
- Use crypto randomness, not Math.random
- Store hashes of long-lived tokens
- Rotate periodically
FAQ
- Safe?
- Uses the Web Crypto API.
- Store?
- Keep only a hash of durable tokens.