Skip to content

Developer tools

UUID Generator (v4 & v7)

Create UUIDs (GUIDs) for database keys, test data and APIs: random v4, or v7 that sorts by creation time.

Version

How to use the UUID Generator (v4 & v7)

  1. 1

    Choose version 4 (random) or 7 (time-ordered).

  2. 2

    Set how many you need and the format.

  3. 3

    Copy them all, copy one, or download a text file.

Frequently asked questions

v4 or v7?

v7 starts with a timestamp, so new IDs sort after old ones. That keeps database indexes compact, which is why it is a good choice for primary keys. v4 is fully random.

Can two UUIDs collide?

In practice no: a v4 UUID has 122 random bits. You would need to create billions per second for many years to expect a single duplicate.

Does Laravel support these?

Yes. Str::uuid() makes v4 and Str::uuid7() (Laravel 11+) makes v7; Eloquent's HasUuids trait uses ordered UUIDs.

Embed this tool on your site

Paste this code into your page. It's free, with no sign-up, ads or cookies.

Preview

Please keep the "Powered by Dev-Talk" link.

Get new articles in your inbox

Practical tutorials and deep dives, about once a week. No spam, unsubscribe anytime.

Privacy policy

Add DEV Talk to your Home Screen

  1. 1 Tap the Share button in Safari's toolbar.
  2. 2 Scroll down and tap Add to Home Screen.
  3. 3 Tap Add. Open it from the Home Screen to read like an app and to turn on notifications with the bell.

We use cookies to improve your experience and analyze traffic. By continuing, you agree to our Privacy Policy.