AG UUID

NanoID nanoid · URL-safe

A compact identifier of URL-safe characters, 21 characters by default.

Overview

It picks characters at random from the A-Za-z0-9_- alphabet. It is shorter than a UUID yet has a low collision probability, and its alphabet and length can be customized.

Structure

Bit length~126
Character length21
FormatURL-safe A-Za-z0-9_-
SortableNo
Random-basedYes

When to use

Great where length matters, such as short links, public IDs, and coupon codes. A good choice when sorting is unnecessary and conciseness comes first.

Example

NanoID
V1StGXR8_Z5jdHi6B-myT

Generate this format

View per-language code →