Cryptographic Random String and API Secret Token Generator
Ideal for developers needing test API keys, session tokens, and database seed fixtures.
Developers and testers need random strings far more often than they admit. You might need an API key placeholder, a session secret for a local project, a batch of fake order references to load into a spreadsheet, or a unique token for a password-reset link prototype. Teachers building worksheets, and admins creating one-time voucher codes, use the same trick. Anything where you want unpredictable text of a known length and a restricted alphabet is a good fit, and a batch of up to 100 saves a lot of typing.
Pick a Character Set from the dropdown: Hexadecimal (0-9, a-f), Alphanumeric (A-Z, a-z, 0-9), Numbers Only (0-9) or Letters Only (A-Z, a-z). Then type a String Length, which accepts 4 to 256, and a Batch Count between 1 and 100. The results appear straight away in a read-only box, one string per line, and any change to the settings regenerates them. Press Re-generate for a fresh batch with the same settings, or Copy All Strings to put the whole list on the clipboard, ready to paste into a spreadsheet or file.
Match the alphabet to where the string will be used. Numeric-only strings are weak because each character adds just over three bits, so a 6-digit code has only a million possibilities; fine for a short-lived code, poor for a secret. Hex is handy for tokens that must survive any system. The generator uses the browser's cryptographic random source, which suits secrets, but it does not check for duplicates inside a batch. For very short strings across many rows, collisions are possible, so deduplicate in your spreadsheet if uniqueness is required.
A quick way to size a token: each hex character carries 4 bits, so the default 32-character hex string holds 128 bits, comparable to a UUID's randomness. An alphanumeric string has 62 symbols, roughly 5.95 bits per character, so 16 characters gives about 95 bits and 22 characters passes 128. If you need 10 order references of 8 letters each, choose Letters Only, set length 8 and count 10, then copy. Remember that hex output here is lowercase only.
Key Highlights:
- Batch generation up to 500 rows
- Custom character set inclusion
- CSPRNG cryptographic source

