dev.ids
unique IDs (UUIDs, ULIDs, nano IDs) and strong passwords
Makes values meant to be unique or hard to guess. UUIDs, ULIDs and nano IDs name records, and passwords are drawn at random with a length and character set you choose.
Tags: random
uuida new random UUID (version 4)passworda random password of letters, digits and symbolspassphraserandom words joined by dashes, easier to type and remember than a password, each adding about 9.4 bits of strengthulida new ULIDnanoida random ID made only of characters that are safe in URLs, about as unlikely to repeat as a UUIDuuid_infowhat kind of UUID this is (its version and variant)
Functions
Section titled “Functions”uuid() -> str
a new random UUID (version 4)
A 36-character ID random enough that two never match, so it can be made anywhere without checking with anyone
1uuid()"1ac87333-7c7a-410c-94ff-f610b6b3c9fd"password
Section titled “password”password(len: int = 20) -> str
a random password of letters, digits and symbols
Each character adds about 6.5 bits of strength. Each bit doubles the guesses an attacker needs, and 80 bits or more is out of reach even for offline guessing
1password()"AvrxYw4j4cvn@8*h@F4x"2password(12)"s^sk6NYkdiDa"See also passphrase
passphrase
Section titled “passphrase”passphrase(words: int = 6) -> str
random words joined by dashes, easier to type and remember than a password, each adding about 9.4 bits of strength
1passphrase()"foggy-perch-fossil-canoe-opera-pecan"2passphrase(4)"vague-viper-chief-carve"See also password
ulid() -> str
a new ULID
26 characters holding the time it was made and then 80 random bits, so sorting ULIDs sorts them by age
1ulid()"01M6KW6QEG7YZ3NQBS54PZE621"nanoid
Section titled “nanoid”nanoid(len: int = 21) -> str
a random ID made only of characters that are safe in URLs, about as unlikely to repeat as a UUID
1nanoid()"u-m85JB6KuH8cZ35tK_Ds"2nanoid(8)"pt2IM7J8"uuid_info
Section titled “uuid_info”uuid_info(s: str) -> map
what kind of UUID this is (its version and variant)
Versions 1 and 7 start with the time they were made, which this reads back
1uuid_info(uuid()){version: 4, variant: "RFC 9562"}2uuid_info("c232ab00-9414-11ec-b3c8-9f6bdeced846"){version: 1, variant: "RFC 9562", timestamp: 2022-02-22 13:22:22 -06:00}See also uuid
More examples
Section titled “More examples”1# a random ID2uuid()"9aa1fe9b-e329-4bad-a25c-17aaec5d3a81"3# when was this UUID made?4uuid_info("01890a5d-ac96-774b-bcce-b302099a8057").timestamp2023-06-29 22:34:18 -05:005# an ID that sorts by time6ulid()"01M6KW6QEK602EXV6VZ6XXQMA9"7# a strong password8password()"i5UDeh?EnrsM=F%6V9MJ"9# one that's easier to type10passphrase()"naval-raven-helix-candy-lance-cloud"Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.