Short ID Generator

Generates short random identifiers using the Web Crypto API, with a configurable length and choice of character set, including an unambiguous default that excludes easily confused characters like 0/O and 1/I/l. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-25

Overview

Introduction

Not every unique identifier needs to be a 36-character UUID — order confirmation numbers, invite codes, and short URLs work better as compact, easy-to-read strings.

This tool generates short random IDs in your browser using a cryptographically secure random source, with a character set designed to avoid characters people commonly confuse.

What Is Short ID Generator?

A configurable short ID generator with four character-set presets: an unambiguous 32-symbol set (default), full alphanumeric, lowercase-only, and numeric-only.

Length and generation count are both adjustable, so you can produce anywhere from a single 4-character code to a batch of 1,000 longer IDs at once.

How Short ID Generator Works

The tool fills a typed array with cryptographically random 32-bit values via crypto.getRandomValues(), then maps each value onto the selected character pool by modulo, the same approach used by this site's random string generator.

Nothing is sent to a server — generation happens synchronously in the browser the moment you change a setting.

When To Use Short ID Generator

Use it for anything a person needs to read, type, or say out loud, like discount codes, invite links, or support ticket references.

Prefer a UUID or ULID instead when the ID is machine-to-machine only (database keys, API resource IDs) and doesn't need to be short or unambiguous for humans.

Features

Advantages

  • Uses a cryptographically secure random source, not Math.random().
  • The unambiguous default eliminates an entire class of user-transcription errors.
  • Four alphabet presets and adjustable length cover most short-code use cases without extra configuration.

Limitations

  • Short IDs have a meaningfully higher collision probability than a UUID at high generation volumes — check the odds for your length and alphabet before relying on this for large-scale uniqueness.
  • The generator has no built-in mechanism to check a new ID against previously issued ones; uniqueness is probabilistic, not guaranteed.

Examples

An 8-character unambiguous ID

Input

(no input; generated from settings)

Output

K7M4XQ9P

Drawn only from the 32-symbol unambiguous alphabet, with 0, O, 1, I, and L excluded.

Best Practices & Notes

Best Practices

  • Use the unambiguous alphabet for anything customers will type by hand, like a promo code.
  • Increase the length as your expected volume of generated IDs grows, to keep collision odds negligible.
  • Generate a batch and skim it for accidentally offensive or confusing letter combinations before using one publicly.

Developer Notes

The unambiguous alphabet (23456789ABCDEFGHJKLMNPQRSTUVWXYZ, 32 symbols) intentionally matches the character set popularized by Crockford's Base32, which was designed for exactly this human-transcription use case.

Short ID Generator Use Cases

  • Generating discount or promo codes
  • Creating short invite codes for a private beta
  • Producing human-readable support ticket or order reference numbers

Common Mistakes

  • Using a short ID as a security token — short IDs are for uniqueness and readability, not for anything that needs to resist guessing, like a password-reset token.
  • Choosing too short a length for a high-volume use case, leading to a meaningful chance of collisions.

Tips

  • Add a checksum character in your own application if you need to catch single-character typos before they cause a lookup failure.
  • For URL slugs, the lowercase-only alphabet avoids case-sensitivity issues across different URL handling code.

References

Frequently Asked Questions