Numbers
Short Hash ID Generator
Used by developers, writers, and creators worldwide.
A short hash ID generator creates the compact alphanumeric codes you see in YouTube links, Bitly slugs, and referral URLs — packing enormous uniqueness into a small footprint. This tool lets you set the ID length, how many to generate, and which character set to use: mixed-case alphanumeric, lowercase-only, uppercase-only, or digits only. An 8-character alphanumeric ID drawn from 62 characters yields over 218 trillion combinations — enough for a mid-sized SaaS product to run for years without collisions. Lowercase-only is easier to read aloud or type on mobile. Uppercase suits printed vouchers. Output is URL-safe and paste-ready: no encoding, no cleanup required.
Loading usage…
Free forever — no account required
How to use
- Choose your options above
- Click Generate
- Copy your result
Detailed instructions
- Set the Count field to how many hash IDs you need in this batch.
- Set the Length field to match your target format — 6 for short links, 8–10 for share codes, 12 for higher-entropy tokens.
- Choose a Character Set: mixed alphanumeric for URLs, lowercase for readable codes, uppercase for printed vouchers.
- Click Generate to produce the batch and review the output list.
- Copy individual IDs or the full list and paste directly into your database seed, spreadsheet, or code.
Use Cases
- •Seeding a URL shortener's slug column with unique 6-character alphanumeric candidates before launch
- •Generating short referral tokens for a Stripe-backed marketing campaign with per-user tracking
- •Producing uppercase voucher codes for a WooCommerce or Shopify discount batch
- •Creating short invite tokens for a private beta signup flow tested in Cypress or Postman
- •Prototyping a pastebin or file-sharing service in Storybook with realistic-looking share IDs
Tips
- →Combine a 4-character prefix (e.g., 'usr_') with an 8-character generated ID to make IDs self-describing and easier to debug in logs.
- →For referral codes users type manually, use lowercase-only at length 6–7 — shorter codes reduce abandonment in signup flows.
- →Generate 25% more IDs than you need, then deduplicate against your existing records before inserting — never assume uniqueness without a check.
- →Length 11 with mixed alphanumeric matches YouTube's ID format exactly — useful when building video platforms or prototyping YouTube API replacements.
- →Avoid numeric-only character sets for public IDs — they look like guessable order numbers and invite enumeration attacks.
- →If IDs will appear in QR codes, lowercase alphanumeric produces simpler, less dense QR patterns that scan faster on low-resolution cameras.
FAQ
how many combinations does an 8-character alphanumeric id actually have
An 8-character ID using the full 62-character set (a–z, A–Z, 0–9) gives 62^8 — roughly 218 trillion combinations. For most web apps handling millions of records, collision probability is negligible. Bumping to 10 characters raises that pool to around 839 quadrillion, worth it if you have security requirements beyond plain uniqueness.
what's the difference between a short hash id and a uuid
UUIDs are 36-character strings built for distributed uniqueness guarantees across systems — overkill in a URL bar. Short hash IDs are typically 6–12 characters, optimized for user-facing slugs where brevity matters. They're statistically safe at most scales but require a uniqueness check on insert; a common pattern is to use them as a public-facing ID alongside an internal integer or UUID primary key.
are the generated ids safe to put directly in a url without encoding
Yes. Every character set in this generator uses only URL-safe characters — no plus signs, slashes, or spaces. You can drop the output directly into a URL path or query string without percent-encoding. If you're building slug fields or href attributes, the IDs work without any sanitization step.