A free tool

UID Generator

UUIDs and nano IDs, straight from a URL. Put the count, the type and the format in the address, in any order, and the IDs come back. It works the same from a browser, from curl, or through a small JSON API.

uid.fredlackey.com/5/uuid

Build a URL

Options

uid.fredlackey.com/5/uuid/json

The uid type is always upper case with no hyphens.

Try one

Each of these is a working link. Change the numbers and words in the address to get something else.

What you can put in the URL

Segments can come in any order. Leave one out and the generator uses its default.

CountAny whole number from 1 to 1,000. Default: 1.
Typeuuid or v4 (random), v1 (time-based), v3 and v5 (name-based), nano or nanoid, and uid (a v4 UUID in upper case without hyphens). Default: uid.
Formatjson (a list, one per line), string (separated by spaces), array (in brackets, separated by commas). Default: json.
Optionscaps, cap, upper or up; lower or low; no-hyphens or undash.
Nano lengthn and a number, for example n21, from 2 to 64. Default: 10.

From the terminal

Anything that isn’t a browser gets plain text back, so the same URLs work in scripts:

curl https://uid.fredlackey.com/string/3/uuid

Through the API

Send a POST to /api with a JSON body. You get back the settings that were used and the values.

curl -X POST https://uid.fredlackey.com/api \
  -H 'Content-Type: application/json' \
  -d '{"uidType":"uuid","length":5,"format":"json","options":["caps"]}'

The body takes uidType, length and format, and optionally nsize (the nano ID length) and options (a list), with the same values as the URL.

Built by Fred Lackey

More of what I build

I built this as a quick tool I needed anyway. The bigger things, the platforms and products, are on my site.

See the work