Interactive demo
UUIDv7 / UUIDv4 + Base62

Generate typed IDs, then tear them back open.

This playground turns the current best-id package into a browser studio: make prefix-aware batches, inspect their UUID payloads, and validate arbitrary input one line at a time.

GitHub
Installpnpm add best-id
Prefix aware
22-char suffix
Batch generation
v7 / v4 modes
A live surface for the parts that matter.

Leave the prefix empty for suffix-only IDs, or use a lowercase namespace like user and order. Every generated item below is immediately parseable into prefix, suffix, and canonical UUID. Switch the version mode to swap the UUID payload without changing the string format.

Prefix rule

lowercase + underscores

Suffix length

22 fixed Base62 chars

Underlying payload

validated Time-sortable UUIDv7

Suggested flow

Generate a batch, inspect any single value, then paste in your own IDs to test prefix expectations and UUID conversion.

01

Pick a version mode, a prefix and a count.

02

Generate a batch and copy any ID or UUID.

03

Send one ID or the whole batch to the parser.

04

Flip the parser to another mode to watch validation reject it.

Generator
Generate multiple IDs

Fresh IDs are created in the browser using the same source file as the package root. Generating a new batch also refreshes the parser input on the right.

Time-sortable UUIDv7

Prefix: user
4 fresh IDs
Mode: v7
Allowed prefix characters: lowercase letters and underscores.
#1
user
UUIDv7

user_034EGZiwXaagKJdPCrSst0

UUID 01a041de-8aaa-70d4-8ef9-713599f23ada

Suffix

034EGZiwXaagKJdPCrSst0

Prefix

user

#2
user
UUIDv7

user_034EGZiwdn46MULLsBHBZc

UUID 01a041de-8aab-777f-b7b9-df51328a2ef4

Suffix

034EGZiwdn46MULLsBHBZc

Prefix

user

#3
user
UUIDv7

user_034EGZiwdn46MUMQfBgmVF

UUID 01a041de-8aab-777f-b7b9-e2c47d67c211

Suffix

034EGZiwdn46MUMQfBgmVF

Prefix

user

#4
user
UUIDv7

user_034EGZiwdn46MUNfByyNLo

UUID 01a041de-8aab-777f-b7b9-e6b8929807e4

Suffix

034EGZiwdn46MUNfByyNLo

Prefix

user

Parser
Parse arbitrary input

Paste one Best ID per line. Add an expected prefix if you want mismatch errors, then inspect the prefix, suffix, and UUID string for every valid line. The accepted version is independent of the generator, so a v4 batch read under the v7 policy is rejected.

Accepts: v7
4 valid
0 invalid

Only UUIDv7 payloads

Valid
user
UUIDv7

user_034EGZiwXaagKJdPCrSst0

Prefix

user

Suffix

034EGZiwXaagKJdPCrSst0

UUID

01a041de-8aaa-70d4-8ef9-713599f23ada

Valid
user
UUIDv7

user_034EGZiwdn46MULLsBHBZc

Prefix

user

Suffix

034EGZiwdn46MULLsBHBZc

UUID

01a041de-8aab-777f-b7b9-df51328a2ef4

Valid
user
UUIDv7

user_034EGZiwdn46MUMQfBgmVF

Prefix

user

Suffix

034EGZiwdn46MUMQfBgmVF

UUID

01a041de-8aab-777f-b7b9-e2c47d67c211

Valid
user
UUIDv7

user_034EGZiwdn46MUNfByyNLo

Prefix

user

Suffix

034EGZiwdn46MUNfByyNLo

UUID

01a041de-8aab-777f-b7b9-e6b8929807e4