Developer

What Is a UUID? Version 4 vs Version 7 Explained

A UUID, or Universally Unique Identifier, is a 128-bit value used to label things without a central authority handing out numbers. What a UUID looks like, why version 4 is the safe default, when version 7 is better, and best practices for IDs.

Awais 2 min readPublished
What Is a UUID? Version 4 vs Version 7 Explained

A UUID, or Universally Unique Identifier, is a 128-bit value used to label things without a central authority handing out numbers. Two services on opposite sides of the world can each mint UUIDs and still expect zero collisions. The ToolOrbit UUID Generator produces version 4 UUIDs, the random variant, using your browser's cryptographic randomness.

What a UUID v4 looks like

A UUID is written as 32 hexadecimal digits in five groups separated by hyphens. In version 4, almost all bits are random; a fixed version digit (4) and a variant digit identify the format. That leaves 122 random bits, which is why collisions are astronomically unlikely.

3f29c1a2-9b7e-4d3c-bf10-6a2e5d9c4471
             version 4   variant

Why version 4 is the safe default

  • No coordination needed: any client or server can generate one independently
  • Cryptographically random when sourced from crypto.getRandomValues, as this tool does
  • Excellent for database primary keys, request IDs, idempotency keys, and file names
  • Unguessable, so they do not leak sequence information the way auto-increment IDs do

Generating IDs in bulk

Set the count and the UUID Generator produces a clean list you can copy in one click. This is ideal for seeding test data, pre-allocating keys, or populating a config file. Because generation happens entirely in your browser, no identifiers are ever transmitted or logged anywhere.

Tip: A UUID is not a secret. It is unguessable enough to act as an opaque handle, but you should still authorize requests rather than relying on the ID being hard to find.

Best practices

Store UUIDs as a native UUID or binary(16) column when your database supports it, rather than as a 36-character string, to save space and speed up indexing. Use lowercase consistently, and prefer v4 unless you specifically need the time-ordering of newer schemes like UUID v7 for index locality.

UUID v4 vs v7, and when either is wrong

v4 is random and collision-safe, which makes it the default for client-generated IDs. v7 encodes the timestamp, giving roughly time-ordered values that index well in databases — the better choice when insertion order matters for performance. Avoid UUIDs entirely when the identifier must be human-readable or short (URL paths, support tickets): a 36-character ID is hostile to memory and email.

  • Use v4 for rows, carts, events, anything generated outside the server.
  • Use v7 in tables where sequential insert performance matters.
  • Never use a random UUID as a secret — it is an identifier, not a credential.

Tools mentioned

More reading

View all guides
Free Developer Tools Online: 2026 Developer Toolkit & Guides
Developer

Free Developer Tools Online: 2026 Developer Toolkit & Guides

Explore 30+ free browser-based developer tools: JSON formatters, Base64 converters, cron generators, regex testers, SQL formatters, and hash generators.

3 min readPublished
CSS Border Radius: 15 Copy-Paste Examples
Developer

CSS Border Radius: 15 Copy-Paste Examples

15 modern CSS border radius examples: rounded cards, pills, circle avatars, asymmetrical organic blobs, and fancy 8-value border radius shapes.

3 min readPublished
Percent Encoding Reference Table (Every Character)
Developer

Percent Encoding Reference Table (Every Character)

Complete percent encoding ASCII reference table: quick lookup for spaces, slashes, ampersands, punctuation, and UTF-8 special characters in URLs.

3 min readPublished
URL Encoding Explained: %20 vs +, Reserved Characters & Rules
Developer

URL Encoding Explained: %20 vs +, Reserved Characters & Rules

Complete guide to percent encoding in URLs: learn when to use %20 vs +, how reserved characters like & and ? work, and how to avoid encoding bugs.

3 min readPublished
Cron Every Hour, Day & Midnight: All Daily Schedules
Developer

Cron Every Hour, Day & Midnight: All Daily Schedules

Master standard daily cron schedules: cron every hour, every day at midnight, twice a day, and custom hourly intervals with copy-paste examples.

4 min readPublished
Cron Expression Cheat Sheet — Copy-Paste Schedule Examples
Developer

Cron Expression Cheat Sheet — Copy-Paste Schedule Examples

Free cron expression cheat sheet with copy-paste examples for every 5 minutes, hourly, daily at midnight, weekdays only, and more.

5 min readPublished
Cron Every 10 Minutes — Syntax, Examples and Best Practices
Developer

Cron Every 10 Minutes — Syntax, Examples and Best Practices

Use the cron expression */10 * * * * to run jobs every 10 minutes, plus examples for common schedules and troubleshooting tips.

3 min readPublished
Why CSV Is Tricky to Parse: Delimiters, Quotes and Headers
Developer

Why CSV Is Tricky to Parse: Delimiters, Quotes and Headers

Why CSV files are harder to read correctly than they look, how to choose the right JSON shape, and the mistakes to avoid.

2 min readPublished