Random String Generator
Generate random strings for API keys, tokens, secrets and test data, with the length, characters, prefix and format you choose. They come from your browser's secure random generator.
How to generate a random string
Choose how many
Set how many strings you want, their length and which characters to use.
Generate
They appear straight away. Press the button for a fresh set.
Copy
Copy the strings for tokens, test data or IDs.
When to use Random String Generator
You need API keys, session tokens, secrets or test IDs in a format you control.
A script needs a batch of random strings with a recognisable prefix such as sk_live_.
Tips for a better Random String Generator result
Choose the characters, the length and how many, and use 32 characters or more for API keys.
Add a prefix to make keys easy to recognise and easy to find if one leaks.
Random String Generator: limits and what to check
They come from a cryptographically secure source, and every character is equally likely.
Use at least two different characters when you supply your own set.
About Random String Generator
Make random strings for API keys, session tokens, secrets and test data. Choose letters, digits, hex, Base64URL or your own characters, a length, a prefix and how many. They come from your browser's secure random generator.
FAQs
Are these strong enough for secrets?
Yes. They use a cryptographically secure source. For API keys, 32 or more characters is a good length.
Why add a prefix?
A prefix such as sk_live_ makes keys easy to recognise and easy to find if one leaks.
Is there bias toward some characters?
No. Every character is equally likely.