Random String Generator

Make random strings for test data, coupon codes, invite codes, file names or temporary IDs. Choose the characters (letters and digits, letters only, digits only, hex, URL-safe, or your own set), set the length and how many you need, and copy or download the list. Every character is picked with your browser's secure random generator, with no character more likely than another.

What to make
characters
Randomness
95 bits
Length
16 chars
Character set
62
Generated
0

Generating runs in your browser. What you type never leaves this device.

Features

  • Letters and digits, letters only, lowercase, uppercase, digits, hex, URL-safe or symbols

  • Your own character set, for codes such as ABCDEFGHJKMNPQRSTUVWXYZ23456789

  • Leave out look-alike characters (0 and O, 1, l and I) for codes people type

  • Any length from 1 to 1,024 characters

  • Up to 500 strings at once, one per line, to copy or download as .txt

  • Shows how many bits of randomness each string has

  • Secure randomness from crypto.getRandomValues, with no bias towards any character

  • Runs in your browser: nothing is sent or saved. Free, no signup

What people make with it

Coupon and referral codes

Eight-character uppercase codes without look-alike characters, so customers can read them from a WhatsApp message or a printed slip.

Test data

Random values for test records, sample IDs for a spreadsheet, or strings of a fixed length to check a form's limits.

Invite and voucher codes

A batch of 200 one-time codes to load into an app or share with an event list.

Temporary file and folder names

Short random suffixes so uploaded files don't overwrite one another.

Choosing characters and length

How long should it be?

Each character adds randomness depending on how many characters it can be. With letters and digits (62 characters) each one adds about 6 bits, so 22 characters give about 128 bits, which nobody can guess. For a coupon code that only needs to be hard to guess for a few weeks and is checked by your server, 8 to 10 characters is usually enough.

The Randomness figure under the options shows the total in bits for the current settings.

Codes people have to type

  • Tick Leave out look-alike characters so 0, O, o, 1, l and I never appear.
  • Uppercase and digits is easier to read aloud over a phone call than mixed case.
  • Your own characters lets you match an existing format, such as only consonants and digits.

Passwords and keys

For a password you will remember or type, the password generator adds passphrases and a strength meter. For an API secret or signing key, the secret key generator gives 256-bit keys in hex or Base64 with a ready .env line.

Random String Generator - FAQ