Random string generator

Generate random strings from letters, digits and symbols – one or up to 100 at a time. Use them as IDs, test data, coupon codes or tokens. Generated locally in your browser.

  • 100% free
  • No signup
  • Runs in your browser

Overview

How to use

  1. Enter the length of each string and how many strings you need (up to 100).
  2. Select the character types to use and, if the strings will be read or typed by people, exclude look-alike characters.
  3. Click Generate and copy the strings from the result box – one string per line.

How many strings are possible

Every character is picked independently and uniformly from the selected characters using the browser’s cryptographic random generator. With an alphabet of n characters and a length of L there are n^L possible strings.

Letters and digits give 62 characters. An 8-character string then has about 218 trillion possibilities, and a 22-character string has more combinations than a 128-bit UUID.

When you generate many strings, the chance of two identical ones depends on the number of possibilities. For short codes of 4–5 characters, check the list for duplicates before you use it.

Possible strings by length

Characters and length Possible strings
Digits, 6 characters 10⁶
Uppercase letters, 6 characters 26⁶ ≈ 3.1 × 10⁸
Letters and digits, 8 characters 62⁸ ≈ 2.2 × 10¹⁴
Letters and digits, 16 characters 62¹⁶ ≈ 4.8 × 10²⁸

Examples

Example Result
Length 8, uppercase letters and digits, 10 strings Coupon or voucher codes such as Q7KX2M9P
Length 32, letters and digits An API key or session token
Length 6, uppercase letters and digits, no look-alikes Codes that are easy to read and type, without 0/O or 1/I
Tips: Use a long length when you need tokens or identifiers.

FAQ

No. The strings are built only in your browser and are never sent to a server.

Yes. They use the Web Crypto random generator with unbiased selection, the same source browsers use for cryptography. For passwords, use the password generator, which also guarantees one character of each selected type.

It is possible but very unlikely for long strings. With short lengths and many strings, duplicates can happen, so check the list if every code must be unique.

Select uppercase and/or lowercase letters and clear the digits and symbols options.

Need another tool?

Explore all 61 free tools: calculators, converters, date and time tools, random generators and text utilities.

Browse all tools