Random String Generator

Generate random strings.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Generate a random string of the length you choose from one of four character sets: letters and digits, letters only, digits only, or lowercase hex. Useful for test data, temporary codes and identifiers.

How to use

1
Step 1
Set the length.
2
Step 2
Choose a character set.
3
Step 3
Press Generate and copy the string.

How it works

Each character is drawn independently and uniformly from the chosen set using the browser's secure random source. The sets are alphanumeric (62 characters), letters (52), numbers (10) and hex (16, lowercase). The more characters in the set, the more randomness per character.

Worked example

A 12-character hex string

Input
Length 12, charset Hex
Output
f6e162810931
Walkthrough
12 hex digits are 48 bits of randomness. A new string is generated on each click.

Limitations

  • No symbols, uppercase-only or custom character sets.
  • Length must be a whole number from 1 to 10,000.
  • Not guaranteed to include every character type, which matters if you need it as a password. Use the password generator for that.

Questions

How do I generate a random string?
Set the length, choose a character set and press Generate.
Is the random string secure?
It uses the browser's secure random generator, so it is suitable for identifiers and codes.
Can I generate a random hex string?
Yes. Choose Hex to get lowercase 0-9 and a-f.
Does it add special characters?
No. Use the password generator if you want symbols.

Features

  • Four character sets
  • 1 to 10,000 characters
  • Secure random source

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • What Is A RESTful API?

    Traversy Media

    API context for JWT, JSON, and encoding utilities.

    Watch on YouTube
  • TypeScript in 100 Seconds

    Fireship

    Typed JS snippets often get formatted or hashed nearby.

    Watch on YouTube