Random String Generator

Create random strings you can trust for secrets. Choose the characters — letters, digits, symbols, hex or base64url — the length and how many, add a prefix if you like, and get cryptographically secure strings with their strength shown in bits.

Length for 128 bits

CharactersLength
Hex (16)32
Base64url (64)22
Alphanumeric (62)22
Lowercase + digits (36)25

When to use it

  1. Generate API keys and access tokens.
  2. Create random codes for invites or vouchers.
  3. Make test data in bulk.
  4. Generate hex secrets for config files.

How to Use

  1. Choose characters and length.
  2. Set count and prefix.
  3. Generate and copy or download.

Features

  1. Crypto-secure, unbiased
  2. Character sets, hex, base64url, custom
  3. Prefix
  4. Bulk with dedupe
  5. Entropy meter

FAQs

Are these strings secure?

Yes — they use the browser's cryptographic random generator with no bias.

How long should an API key be?

Aim for at least 128 bits of entropy — e.g. 32 hex or 22 base64url characters.

What does 'exclude look-alikes' do?

Removes 0/O and 1/l/I, which are easy to misread.

Can I add a prefix like sk_live_?

Yes.

Are the strings sent anywhere?

No — generated in your browser.

Technical Details

The character pool comes from the sets you pick (lowercase, uppercase, digits, symbols), from hex or base64url, or from your own characters, with look-alikes (0 O 1 l I) optionally removed. Each character is chosen with crypto.getRandomValues and rejection sampling — out-of-range random values are discarded instead of reduced with modulo — so every character is exactly equally likely. Entropy per string is length × log₂(pool size), with a warning under 64 bits. Up to 10,000 strings can be generated, deduplicated if you want, with an optional fixed prefix such as sk_live_.

Developer Tools

Developer Tools

  • Test IBAN Generator
  • UUID Generator
  • Regex Tester
  • Cron Parser
  • JSON to TypeScript
  • SQL Formatter
  • CSS Formatter
  • HTML Formatter