#1 India's Top IT Training Institute

×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
🆔 FREE · SECURE RANDOM

UUID Generator: v4, v7 and v5 in One Place

Create unique IDs for databases, APIs and tests, in the format your code needs.

  • 🎲 v4 random
  • ⏱️ v7 sortable by time
  • 🔍 UUID inspector

How to use the UUID Generator

  1. 1. Choose a versionv4 for random IDs, v7 for database keys, v5 for the same ID from the same name.
  2. 2. Set the formatHow many, uppercase, no hyphens, braces, or quoted for code.
  3. 3. GenerateCopy or download the list, or paste a UUID to inspect it.

Which version to use

A UUID is a 128-bit identifier written as 32 hex digits in the pattern 8-4-4-4-12. Version 4 is 122 random bits; this tool takes them from your browser's cryptographically secure generator. Version 7 (added in RFC 9562 in 2024) starts with a 48-bit millisecond timestamp followed by random bits, so new IDs sort after older ones. That keeps database indexes compact, which is why v7 suits primary keys. IDs made in the same millisecond still come out in order. Version 5 is a SHA-1 hash of a namespace and a name, so the same input always gives the same UUID. Everything runs in your browser; nothing you type or choose is uploaded.

The inspector reads any UUID and reports its version and variant, and for v1 and v7 the time it was created.

Worked example

Choose version 5, the DNS namespace and the name uncodemy.com, and the tool gives cd1ca000-b3d1-51ae-8aed-5017f9909421 every time, on any device or programming language. As a check, the name python.org gives 886313e1-3b8a-5372-9b90-0c9aee199e5d, the same value shown in Python's own uuid documentation. Paste the first one into the inspector and it reports version 5 (name-based, SHA-1) with the standard RFC 9562 variant.

Good to know

  • v7 reveals when a record was created; use v4 where that must stay private.
  • v5 isn't secret: anyone with the namespace and name can recreate it.
  • Store UUIDs in a native UUID column (PostgreSQL uuid, or BINARY(16) in MySQL) rather than text, to save space.

Frequently asked questions

Can two v4 UUIDs ever be the same?

In theory yes, but with 122 random bits the chance is negligible for any real system.

Are UUIDs sent anywhere?

No. They're generated in your browser and never leave it.

Is the UUID generator free?

Yes. You can open the UUID generator and fill in every option without signing up. When you generate UUIDs for the first time, we ask once for your name and WhatsApp number; after that it, and every other Uncodemy tool, opens straight away.

More free tools

See all free tools