Token generator

    Generate random strings with the alphabet you choose — API keys, passwords, nonces.

    Loading tool…

    About the token generator

    Builds random strings from the character sets you tick, using your browser's cryptographic random number generator rather than Math.random. Useful for API keys, session secrets, database passwords and one-off nonces. The entropy figure under the results tells you how much guessing work an attacker actually faces.

    Frequently asked questions

    How long should an API key be?

    Aim for at least 128 bits of entropy. With the full alphanumeric set that is about 22 characters; the default of 40 gives you roughly 238 bits, which is comfortable for anything long-lived.

    Are these tokens safe to use in production?

    The randomness comes from crypto.getRandomValues(), which is the same source your runtime would use. The weak link is transport — copy it straight into your secret manager rather than through chat or email.

    Often used alongside