Random String Generator

Generate random alphanumeric strings, short IDs or hex tokens of any length.

Runs in your browser. Nothing you type is sent to a server.

How to use Random String Generator — Free Online Random ID & Token Tool

  1. 1Pick what you want to generate and how many.
  2. 2Set the length or number range, and any formatting options.
  3. 3Copy the whole list, download it as a text file, or press Regenerate for a fresh set.

About Random String Generator

Random strings do the unglamorous work of software: session identifiers, API keys, file names, invite codes, test fixtures. The only thing that really matters is where the randomness comes from.

Everything here is drawn from crypto.getRandomValues, the browser's cryptographically secure source, with rejection sampling so no character is more likely than another. That is a meaningful difference from tools built on Math.random, whose output is predictable enough that it should never be used for anything secret.

Choose hex when you need to match an existing format, and the short-ID alphabet when you want the most entropy per character in something that has to survive being pasted into a URL.

Frequently asked questions

How long should a random ID be?
For something that must be unguessable, aim for at least 128 bits of entropy — roughly 22 alphanumeric characters or 32 hex characters. Shorter is fine for non-secret identifiers.
What is the short ID format?
A 64-character URL-safe alphabet (letters, digits, hyphen and underscore), the same set used by nanoid. It packs more entropy per character than hex and is safe in URLs and filenames.
Can I use these as passwords?
You can, though the password generator is better suited — it balances character classes and reports strength. These are aimed at machine-readable identifiers.
Are they unique?
At sensible lengths, collisions are vanishingly unlikely, but nothing here checks against a list. If uniqueness must be guaranteed, enforce it with a unique constraint where you store them.
Is it free?
Yes — unlimited use, no sign-up, no watermark and no limit on how many times you run it.