UUID & token generator

Generate random UUID v4 values and secure random tokens locally for IDs, API keys, and testing.

How to use the uuid & token generator

  1. Choose how many values and whether you want UUIDs or tokens.
  2. Press Generate.
  3. Copy the results.

UUIDs & tokens

A UUID v4 is a 128-bit identifier built from random data, designed to be unique without any central coordination — the standard choice for random IDs. The token option gives you a URL-safe random string handy for API keys and session secrets. Both use your browser's cryptographically secure random source.

Code & API examples

Use this from the command line or your code.

Shell
uuidgen
Python
import uuid
print(uuid.uuid4())
Random token
openssl rand -base64 24

See all endpoints at /api/tools/.

Frequently asked questions

A 128-bit identifier made from random data, designed to be unique without a central authority. It's the standard choice for random IDs.

Yes — they're generated from your browser's cryptographically secure random source, suitable for tokens as well as IDs.

Labeling things uniquely without a central counter — database rows, API requests, files, and distributed systems where two machines must mint IDs that never collide.

In practice, no. A v4 UUID has 122 random bits, so you'd have to generate billions per second for many years before a collision became remotely likely.

Version 1 derives from a timestamp and the machine's MAC address, which can leak when and where it was made. Version 4 is purely random, so it reveals nothing — usually the safer default.

A v4 UUID's 122 random bits make it hard to guess, so it works for session or invite tokens. For high-value secrets, a dedicated random token of 256 bits gives more margin.

Yes — generation uses WebCrypto locally and nothing is transmitted or logged. The value exists only on your device until you copy it somewhere.

It can be, and it's great for distributed inserts, but random UUIDs scatter index writes and take more space than integers. UUID v7 or ULIDs sort by time and index more efficiently.

The standard form is lowercase hexadecimal, but the value is the same regardless of case. Normalize to one case before comparing or storing to avoid duplicate-looking entries.

The 13th hex digit is fixed to 4 to mark the version, and one digit in the next group encodes the variant. The remaining 122 bits are random, which is where the uniqueness comes from.

Auto-increment IDs are sequential, small, and predictable; UUIDs are large, random, and can be created anywhere without coordination. Random IDs also avoid leaking how many records exist.

Not when it's drawn from a cryptographically secure source like WebCrypto, as here — each value is independent and unpredictable, unlike sequential IDs or those from a weak random function.
Want to hide your IP for real?

vpn.golf is a no-logs WireGuard VPN. Pick a hole, take the shot.

Step up to the tee — free