Перейти к основному содержимому
FreeOnlineTools Go
Русский
how-to

Как генерировать UUID шаг за шагом

By FreeOnlineTools Team · Updated 2026-09-02

Quick Answer

Чтобы сгенерировать UUID: откройте UUID Generator, выберите версию 4 (random) и нажмите Generate. Инструмент производит UUID вроде "550e8400-e29b-41d4-a716-446655440000" через crypto.getRandomValues. Вся генерация локально.

Introduction

UUID (Universally Unique Identifier) — 128-bit идентификатор, практически гарантированно уникальный без координации между сторонами. UUID широко используются как primary key баз данных, request ID, session token и идентификаторы в распределённых системах. Наиболее распространённая версия — UUID v4, использующая случайные биты.

Step by Step

  1. Open the UUID Generator tool

    Go to the UUID Generator tool page. The tool supports UUID v4 (random) and v1 (time-based) generation.

  2. Select the UUID version

    Choose UUID v4 for most use cases — it uses cryptographically secure random bits and has no privacy concerns. Choose v1 only if you need time-ordered IDs and accept the privacy tradeoff (v1 embeds a timestamp and MAC address).

  3. Choose the quantity

    Set how many UUIDs you want to generate — from 1 to 1000. Generating multiple UUIDs at once is useful for seeding a database or creating batch request IDs.

  4. Generate the UUIDs

    Click Generate. The tool produces UUID(s) using crypto.getRandomValues for v4, ensuring cryptographic randomness. Each UUID is a 36-character string in the format 8-4-4-4-12 hex digits.

  5. Copy the UUID(s)

    Click Copy to copy a single UUID, or copy the entire list if you generated multiple. Use the UUID as a database ID, request correlation ID, or session token.

Examples

UUID v4 (random)

Input: Version: 4, Quantity: 1

Output: 550e8400-e29b-41d4-a716-446655440000

Multiple UUID v4

Input: Version: 4, Quantity: 3

Output: f47ac10b-58cc-4372-a567-0e02b2c3d479 7b582ea2-1f4d-4f6a-9c83-3a5f2b8e1d47 3d4a5b6c-7e8f-4a2b-9c1d-0e3f5a7b9c2d

UUID v1 (time-based)

Input: Version: 1, Quantity: 1

Output: a3bbf0ee-d6e4-11ed-a5b3-3c9703e8b4a1

Common Problems

  • Using Math.random() to generate UUIDs —it is not cryptographically secure. Always use crypto.getRandomValues() or crypto.randomUUID().
  • Storing UUIDs as strings in databases —UUIDs stored as UUID type (16 bytes) are more efficient than strings (36 bytes).
  • Using v1 in security-sensitive contexts —v1 embeds a timestamp and MAC address, which can leak information. Use v4 for anonymity.
  • Assuming UUIDs are truly unique —they are practically unique (collision probability is negligible), but not guaranteed unique.

Tips

  • Use UUID v4 for almost all use cases —it is random, has no privacy concerns, and is supported by all modern databases.
  • Use crypto.randomUUID() in modern browsers for a built-in v4 generator without a library.
  • Store UUIDs as UUID/GUID type in databases (16 bytes) instead of strings (36 bytes) for better storage and index performance.
  • Use UUIDs as request IDs for distributed tracing —they correlate requests across services without central coordination.

Related Tools

Related Guides

References