How to use it
- Drag the slider to pick a length.
- Leave Start with a letter ticked if the slug will be used as an ID or variable name.
- Press Generate, then Copy.
About
Slugs here use only lowercase letters and digits, so they’re safe in URLs, filenames, CSS class names and most database keys without any escaping. The slider jumps from 12 to 24, 32 and 64 characters for when you need something closer to a token.
Characters are picked with the browser’s cryptographic random number generator rather than Math.random, so slugs aren’t predictable. Starting with a letter matters for HTML IDs and many programming languages, which don’t allow names to begin with a digit.
Questions
How likely is a clash?
A 12-character slug has 36 possible characters in most positions, giving trillions of combinations. For a few thousand slugs a clash is vanishingly unlikely; use 24 or more if you’re generating millions.
Are these safe to use as passwords?
They’re random, but use a password manager for passwords; it can include symbols and remember them for you.