UUID Generator
UUID v4をブラウザ内で即座に生成します。最大100個まで一括生成できます。
How to Use the UUID Generator
This free online UUID generator creates version 4 universally unique identifiers (UUIDs) directly in your browser. UUID v4 identifiers are generated using cryptographically secure random numbers via the Web Crypto API, ensuring high-quality randomness. Simply specify the number of UUIDs you need (from 1 to 100), click the generate button, and copy individual UUIDs or all of them at once. No data is sent to any external server.
What Is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. UUIDs are designed to be unique across space and time without requiring a central registration authority. The version 4 UUID format uses random or pseudo-random numbers for all significant bits, making collisions extremely unlikely. The probability of generating two identical UUID v4 values is approximately 1 in 2^122, which is for all practical purposes zero. UUIDs are represented as 32 hexadecimal digits displayed in five groups separated by hyphens in the form 8-4-4-4-12.
Common Use Cases for UUIDs
UUIDs are widely used in software development as primary keys in databases, ensuring unique record identification without sequential counters that could expose business data. They serve as correlation identifiers in distributed systems and microservice architectures, allowing requests to be traced across multiple services. UUIDs are also used as session tokens, file identifiers, message IDs in event-driven systems, and unique resource names in cloud infrastructure. Their guarantee of uniqueness without coordination makes them ideal for systems where multiple components generate identifiers independently.
UUID v4 vs Other Versions
While UUID v1 uses timestamps and MAC addresses, and UUID v5 uses namespace-based hashing, UUID v4 relies entirely on random numbers. This makes v4 the most commonly used version for general-purpose unique identifier generation because it requires no external input and provides strong uniqueness guarantees. Some newer proposals like UUID v7 combine timestamps with randomness for sortable identifiers, but v4 remains the standard choice for most applications.
UUIDジェネレーターの使い方
この無料オンラインUUIDジェネレーターは、ブラウザ内でUUID v4を即座に生成します。 Web Crypto APIを使用した暗号学的に安全な乱数で生成されるため、高品質な一意性が保証されます。 生成数(1~100)を指定し、「生成」ボタンをクリックするだけです。 個別にコピーすることも、「全てコピー」で一括コピーすることもできます。 データはサーバーに送信されることなく、全てブラウザ内で処理されます。
v4とv7のどちらを使うべきか
DBのプライマリキーには時系列ソート可能なUUID v7が推奨されます。 v4の完全ランダム性が必要な用途(公開URLのリソースIDなど)との使い分け、 性能差、ULIDとの比較はUUID v4とv7の違いで詳しく解説しています。
よくある落とし穴と対処 / Common Pitfalls
| 落とし穴 / Pitfall | 問題 / Problem | 対処 / Fix |
|---|---|---|
| 大文字・小文字の混在 Mixed upper/lower case | RFC 9562 は出力を小文字と規定。比較時に不一致が起きる RFC 9562 specifies lowercase output; mixed case breaks string comparison | 保存・比較は小文字に正規化する Normalize to lowercase before storing or comparing |
| v4をDBの主キーにして遅くなる Slow inserts with v4 primary keys | 完全ランダムなためB-treeインデックスの挿入位置が分散しページ分割が多発 Random values scatter B-tree inserts, causing page splits | 時系列ソート可能なv7(またはULID)を検討 Prefer time-ordered v7 (or ULID) for primary keys |
| Math.random での自作UUID Hand-rolled UUIDs with Math.random | 乱数品質が低く衝突リスクが上がる。version/variantビットの設定漏れも Weak randomness and missing version/variant bits | crypto.randomUUID() か本ツールを使う Use crypto.randomUUID() or this tool |
| 短縮やトリミング Truncating UUIDs | 一部だけ使うと一意性の保証が大きく崩れる Using a prefix destroys the uniqueness guarantee | 短いIDが必要なら専用の生成方式(nanoid等)を採用 Use a purpose-built short-ID scheme instead |
| UUIDを秘密情報として使う Treating UUIDs as secrets | 推測困難ではあるが、認可の代わりにはならない Hard to guess, but not a substitute for authorization | アクセス制御は必ずサーバー側の認可で行う Always enforce server-side authorization |
言語別コード例 / Code Examples
JavaScript / Node.js
crypto.randomUUID(); // ブラウザ・Node 19+ どちらも標準対応
// "f47ac10b-58cc-4372-a567-0e02b2c3d479"Python
import uuid
str(uuid.uuid4()) # v4
# Python 3.14+ なら uuid.uuid7() も利用可PostgreSQL
SELECT gen_random_uuid(); -- v4 (PostgreSQL 13+で標準)Go
import "github.com/google/uuid"
id := uuid.New().String() // v4UUIDの構造 / Anatomy
f47ac10b-58cc-4372-a567-0e02b2c3d479
^ ^
| バリアント(8/9/a/b のいずれか)
バージョン(4 = ランダム生成)
128ビット中、versionとvariantを除く122ビットがランダム
→ 衝突確率は 10^18 個生成しても約 0.00000005%Why browser-only?
UUIDs often become database keys, request IDs, or resource identifiers in your system. A server-side generator could log every ID it hands out — linking them to your IP and timestamps. This tool generates UUIDs with crypto.getRandomValues() entirely in your browser: the IDs exist only on your machine until you decide where to use them. No network requests are made; check the DevTools Network tab to verify.
生成したUUIDはあなたのシステムのキーとして使われるもの。本ツールは生成から表示まで 全てブラウザ内で完結し、生成されたIDが外部に記録されることはありません。
関連ガイド
関連ツール / Related Tools
開発をもっと効率的に
PR
レンタルサーバー
エックスサーバー
国内シェアNo.1の高速レンタルサーバー(エックスサーバー社調べ)。WordPressも簡単セットアップ。
詳しく見る →レンタルサーバー
ConoHa WING
国内最速クラスのレンタルサーバー。独自ドメイン永久無料特典付き(特典内容は変更される場合があります)。
詳しく見る →レンタルサーバー
mixhost
高速SSD・HTTP/3対応のクラウド型レンタルサーバー。
詳しく見る →VPS
シンVPS
メモリ単価国内最安・オールNVMe SSD搭載の高性能VPS。開発・検証環境の構築に。
詳しく見る →Windows VPS
ConoHa for Windows Server
Windows環境のVPS。リモートデスクトップで開発・検証環境を構築。
詳しく見る →