๐ Runs in your browser โ nothing is uploadedโ Free, no signup
Random String & Token Generator
Generate cryptographically secure random strings for API keys, tokens, secrets and codes. Choose the characters and length, add a prefix, and create up to 100 at once.
Presets
Random strings
62 possible characters ยท about 191 bits of randomness per string. Generated with your browser's secure random generator; nothing is stored or sent.
When should you use the Random String Generator?
- Creating API keys, secrets or tokens for an application
- Generating random IDs, coupon codes or test data
- Making hex or URL-safe tokens for links and sessions
How to use the Random String Generator
- 1
Choose characters
Letters and numbers, hex, numbers only, URL-safe Base64 or your own set.
- 2
Set length and count
Any length from 1 to 1,024 characters, up to 100 strings at once.
- 3
Add a prefix (optional)
Prefixes like sk_ or key_ make keys easy to recognise.
- 4
Copy
Copy one string or all of them.
Examples
Presets
Preset
API key (32) Hex token (64) 6-digit code
Example output
q8ZfK2mLx0Rt7WbV4nYc1JpHs9DgE3uA 9f1c4e7aโฆ (64 hex characters) 402917
Common errors and how to fix them
Enter at least one custom character- With Custom characters selected, type the characters you want to use, e.g. ABCDEF0123456789.
Is a short string secure enough?- Check the bits of randomness shown. For secrets and API keys aim for at least 128 bits โ for example 22+ alphanumeric characters or 32 hex characters.
More from Generators & Testers
Free tools that run in your browser โ no signup, nothing uploaded.
Regex Tester & Debugger
Test JavaScript regular expressions with live match highlighting and groups.
Cron Expression Generator
Build cron schedules, read them in plain English and preview next runs.
UUID / GUID & ULID Generator
Generate UUID v4, v7 and ULID identifiers, or inspect an existing one.
Epoch converter online
Convert UNIX timestamps to human-readable dates and back instantly.
Time Zone Converter
Convert a time between time zones and compare cities side by side.
Random Number Generator
Generate random numbers in any range โ unique, sorted or decimals.
URL Slug Generator
Turn titles into clean, SEO-friendly URL slugs.
Chmod Permissions Calculator
Convert Linux file permissions between octal (755) and symbolic (rwxr-xr-x).
Semver Range Checker & Calculator
Check which versions match an npm semver range, compare and bump versions.
Random String Generator FAQ
Yes. They're generated with the browser's cryptographically secure random generator (crypto.getRandomValues), with no bias toward any character.
Aim for at least 128 bits of randomness โ about 22 alphanumeric characters or 32 hex characters. 32 or more alphanumeric characters is common.
One made only from letters, digits, - and _ (Base64URL characters), so it can be used in URLs and file names without encoding.
The Password Generator ensures passwords include each character type you choose and shows strength. This tool makes strings from exactly the characters you pick โ ideal for tokens, IDs and codes.
No. Strings are generated in your browser and are never sent to a server or saved.
For standard unique identifiers use the UUID Generator, which creates RFC 4122 v4 UUIDs.
