Skip to content
Settings → TokensSecurity tools

Token Generator

Generate secure random tokens for API keys, JWT and webhook secrets, reset links and codes. Hex, Base64, UUID or your own characters, up to 500 at once.

Did this tool work for you?

About this tool

About Token Generator

Token Generator makes random tokens that cannot be guessed, for API keys, secrets, reset links and codes. Choose the type: letters and numbers, hex, Base64, Base64URL, letters with symbols, numbers only, a UUID, or your own set of characters. Set the length in characters, or in bytes for hex and Base64, and how many you need, up to 500. A prefix such as key_ can be added to every token, which makes it easy to recognise in logs and to find by scanners if it leaks by mistake. Presets fill in common settings: an API key, a JWT secret, a webhook secret, a reset link and a 6-digit code. For every setting you see the number of random bits, which tells you how hard the token is to guess. Each bit doubles the work: a 32-byte hex token has 256 bits, 32 letters and numbers have about 190, and a UUID has 122. A 6-digit code has only about 19 bits, so it is safe only when tries are limited and the code expires quickly, and the page says so. Skip characters that look alike removes 0, O, o, 1, l, I and the vertical bar, which helps when people have to type a token. The tokens come from your browser’s secure random generator, the same source that is used for encryption keys, and every character has exactly the same chance, without the small bias that appears when random numbers are simply divided. They are made on your device after the page has loaded, are not sent anywhere, and are gone when you close the page unless you copy or download them. For live systems it is better still to make a secret on the server where it is used, so the page also shows the commands and code that do this in the terminal, Node.js, Python and PHP.

Token Generator tool

What tokens are used for

Pick the right length for the job

API keys

Give each client its own key.

Examplekey_ followed by 40 letters and numbers.

JWT secrets

Sign tokens with HS512.

Example64 random bytes in Base64.

Webhook secrets

Let receivers check your messages.

Example32 bytes as hex with a prefix.

Password reset links

Use a token that fits in a URL.

Example32 bytes as Base64URL, valid for a short time.

One-time codes

Short codes that people type.

ExampleSix digits, with few tries and a short life.

Test data

Fill a table with unique values.

ExampleDownload 500 UUIDs.

Token tips

Safe from creation to deletion

Use 128 bits or more

For anything that can be tried without a limit.

Store a hash

Keep only a hash of API keys and reset tokens, as you would for passwords.

Let them expire

Reset links and codes should work once and for a short time.

Keep them out of code

Put secrets in environment variables or a secret store, not in the repository.

Sign with it

Use the secret to make a message signature.

Open HMAC Generator

For people to remember?

Make a password or passphrase instead.

Open Password Generator
Built & tested by

HemantInsights

Senior Software Engineer · Developer of Toolyconvert

Hemant developed Token Generator and tests it on desktop and mobile with real files. He is a senior software engineer from Dehradun, India, building websites since 2014, and designed and developed Toolyconvert end to end.

Last updated 24 November 2026

Answers and guidanceFrequently Asked Questions
Are the tokens really random?
Yes. They use the browser’s cryptographic random generator, and every character has the same chance.
How long should an API key be?
128 random bits or more. 32 letters and numbers have about 190 bits.
What is the difference between hex and Base64?
Both write the same bytes. Hex needs two characters a byte; Base64 is shorter but has + and /. Base64URL replaces those so it fits in a link.
Is a 6-digit code safe?
Only with a limit on tries and a short life. It has about 19 bits.
What length does a JWT secret need?
At least 32 bytes for HS256 and 64 bytes for HS512. The JWT secret preset makes 64.
Can I make several at once?
Yes, up to 500. The first 50 are shown; Copy all and the TXT file include every one.
Are tokens saved or sent?
No. They exist only on this page until you close it.
More tools for your workflowRelated Tools

Featured on

Toolyconvert is listed on these product directories and launch platforms.