Learn

Token Generator Guide

About this tool

Generate random tokens and passwords of a chosen length from a chosen character set, drawn from the browser’s cryptographic random source. Useful for API keys, session secrets and share links.

Questions

How long should a token be?
For a machine-generated secret, 32 characters from a mixed alphabet is about 190 bits of entropy, which is far past brute force. Length buys you more than character variety does.
Is Math.random good enough for this?
No. Math.random is a fast seeded generator whose output can be predicted from previous values. This tool uses crypto.getRandomValues instead.