🆔

UUID Generator

Generate unique identifiers for documents, records, or workflows.

UUID Generator — what it does

Generate universally unique identifiers, one at a time or ten at once, using the browser's cryptographic random source. A UUID is a 128-bit value formatted as 36 characters, and the point of it is that two systems can each create one without coordinating and still never collide.

Worked example

One press of 'Generate 10 UUIDs' on 2026-10-20; every run produces different values, so the ten below will never appear again.

Input — action

Click: Generate 10 UUIDs (no settings)

Output — 10 UUIDs, one per line

feec1909-ccb2-4378-85ac-c08950af6bbc
6256b354-378b-43a6-8053-8db216ae81a6
72b17ee9-6b27-4233-b5ef-7c93a4eeab31
3d3a9ec2-44eb-4d0f-811b-129e21dfed65
7be1db9b-7de6-421e-9a13-26e4196bbcb1
c0734603-2e12-493b-95ef-1d18a3be5f27
f8492b94-0951-4fe5-91fe-5fdfc2ad639f
7b1be59f-c23e-481e-ab9e-a1a71c742f3e
debdacaf-b450-492a-8d61-351b2f2849ba
f8c25f81-050d-4480-85b3-2e29c89abf81

The 13th hex digit is always 4 and the 17th is 8, 9, a or b — the markers of a version 4 random UUID.

When this tool helps

  • Creating primary keys for records that must be unique across several systems or databases.
  • Generating correlation identifiers to trace a request through a distributed system.
  • Producing unique filenames or reference codes without a central counter.

How to use it

  1. Generate a single UUID, or ten at once.
  2. Read the generated values.
  3. Copy the one you need.
  4. Generate again for more.

Accuracy, limits, and good practice

  • Random UUIDs carry no ordering, so using them as a clustered database key can hurt insert performance — sequential variants exist for that reason.
  • They are unique, not secret: a UUID in a URL is guessable in the sense that it identifies a resource, so do not use one as an access token.
  • Store them as a native UUID type where your database offers one; as text they take 36 bytes instead of 16.

Frequently asked questions

Can two UUIDs collide?

The probability is negligible. You would need to generate billions per second for decades before a collision became likely.

What is the difference between UUID versions?

Version 4 is random, version 1 embeds a timestamp and MAC address, and newer time-ordered versions improve database locality.

Is a UUID safe to expose in a URL?

It identifies rather than authorises. Exposing one is fine as long as access control does not depend on the identifier being unknown.

Which version and format are generated?

Version 4 (random) only, written in lowercase with four hyphens: 8-4-4-4-12 hex digits, 36 characters. The two fixed bits are set after drawing 16 random bytes from crypto.getRandomValues, so the version digit is always 4 and the variant digit 8 to b.

Can I change the batch size?

No. The two buttons produce exactly one or exactly ten; for more, press the batch button again and paste the groups together. Each press replaces the previous output, so copy before generating again.

Related tools on this site

Everything above runs inside this page. UUID Generator needs no account, no upload, and no server round trip — close the tab and nothing is left behind.

UUID 產生器能做什麼

以瀏覽器的密碼學隨機來源產生通用唯一識別碼,可一次產生一個或十個。UUID 是格式化為 36 個字元的 128 位元值,它的重點在於:兩個系統各自產生,卻仍然不會撞在一起。

實際範例

2026-10-20 按一次 Generate 10 UUIDs;每次執行的值都不同,下面這十個永遠不會再現。

來源:動作

Click: Generate 10 UUIDs (no settings)

顯示:10 個 UUID,一行一個

feec1909-ccb2-4378-85ac-c08950af6bbc
6256b354-378b-43a6-8053-8db216ae81a6
72b17ee9-6b27-4233-b5ef-7c93a4eeab31
3d3a9ec2-44eb-4d0f-811b-129e21dfed65
7be1db9b-7de6-421e-9a13-26e4196bbcb1
c0734603-2e12-493b-95ef-1d18a3be5f27
f8492b94-0951-4fe5-91fe-5fdfc2ad639f
7b1be59f-c23e-481e-ab9e-a1a71c742f3e
debdacaf-b450-492a-8d61-351b2f2849ba
f8c25f81-050d-4480-85b3-2e29c89abf81

第 13 個十六進位字元永遠是 4,第 17 個是 8、9、a 或 b,這是版本 4 隨機 UUID 的標記。

什麼時候用得上

  • 為必須跨多個系統或資料庫保持唯一的紀錄建立主鍵。
  • 產生關聯識別碼,用來追蹤請求在分散式系統中的流向。
  • 在沒有中央計數器的情況下產生唯一檔名或參考代碼。

使用步驟

  1. 產生單一 UUID,或一次產生十個。
  2. 查看產生的數值。
  3. 複製需要的那一個。
  4. 需要更多就再產生一次。

精確度、限制與實務建議

  • 隨機 UUID 不帶順序,拿來當叢集索引鍵可能拖慢寫入效能——正是為此才有時間排序的變體。
  • 它是唯一而非機密:網址中的 UUID 只是識別資源,不該當成存取權杖使用。
  • 資料庫若有原生 UUID 型別就用它;存成文字要 36 位元組,原生型別只需 16。

常見問題

兩個 UUID 會撞號嗎?

機率微乎其微。要每秒產生數十億個、持續數十年,撞號才會變得有可能。

各版本 UUID 差在哪?

第 4 版是隨機的,第 1 版內嵌時間戳與 MAC 位址,較新的時間排序版本則改善了資料庫的局部性。

UUID 可以放在網址中嗎?

它是識別而非授權。只要存取控制不依賴「別人猜不到」,公開它就沒問題。

產生的是哪個版本、什麼格式?

只有版本 4(隨機),小寫、四個連字號:8-4-4-4-12 個十六進位字元,共 36 字元。先以 crypto.getRandomValues 取 16 個隨機位元組,再固定兩個位元,所以版本位永遠是 4、變體位是 8 到 b。

可以改批次數量嗎?

不行。兩個按鈕固定產生一個或十個;要更多就再按一次批次按鈕,把幾組貼在一起。每按一次都會蓋掉上一次的內容,再產生前先複製。

本站相關工具

以上步驟全部在這個頁面內完成,UUID 產生器 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。