1. Converter Tools > 
  2. Dev Tools > 
  3. UUID Generator

UUID Generator

Generate a random UUID v4. Copy to clipboard.

Generate a random UUID v4. A UUID (Universally Unique Identifier) is a 128-bit value that is almost always unique, even when created on different machines or at different times. UUIDs are widely used as primary keys in databases, resource IDs in APIs, and unique identifiers in config files and distributed systems.

This tool creates UUID version 4 values, which are based on random data. Click Generate to create a new UUID, then use Copy result to paste it into your application, database, or configuration. You can generate as many as you need. Each one will be different with extremely high probability.

Loading…

Advertisement

Examples

  • Click Generate to get a new UUID v4
  • Use Copy result to paste into your app or config

FAQ

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier, usually shown as 36 characters with hyphens (e.g. 550e8400-e29b-41d4-a716-446655440000). It is designed to be unique without needing a central authority to assign it.

What is UUID v4?

UUID version 4 is generated from random (or pseudo-random) data. 122 bits are random. The rest encode the version (4) and variant. It is the most common type for APIs, databases, and distributed systems when you need a random unique ID.

When should I use a UUID?

Use UUIDs when you need unique identifiers across systems without coordination: primary keys in databases, API resource IDs, file names, distributed systems, or any case where multiple parties might generate IDs independently.

Are these UUIDs cryptographically secure?

No. This tool uses the browser's Math.random(), which is not suitable for security-sensitive use (e.g. tokens or secrets). For that, use a cryptographically secure generator or generate UUIDs on the server.

What is the difference between UUID versions?

v1: time + MAC address (ordered but leaks machine info). v3: MD5 hash of namespace + name (deterministic). v4: random (most common). v5: SHA-1 hash of namespace + name (deterministic, preferred over v3). v7: Unix timestamp + random (time-ordered, excellent for databases — indexes well).

What is the difference between UUID and GUID?

GUID (Globally Unique Identifier) is Microsoft's name for UUID. GUIDs follow the UUID standard and are formatted identically. The terms are interchangeable; GUID is common in Windows/Microsoft ecosystems, UUID everywhere else.

What is the probability of a UUID collision?

Generating a duplicate UUID v4 is extraordinarily unlikely. After generating 1 billion UUIDs per second for 100 years, the probability of a single collision is about 50%. For practical purposes, UUIDs are unique.

How do I store UUIDs in a database?

Use a native UUID column if your database supports it (PostgreSQL, MySQL 8+, SQL Server). Otherwise use CHAR(36) for the formatted form or BINARY(16) to store the raw bytes and save space. BINARY(16) is about 37% smaller and faster to index.

What is UUID v7 and why is it better for databases?

UUID v7 embeds a Unix timestamp (milliseconds) in the first 48 bits, making UUIDs naturally sortable by creation time. This dramatically improves database index performance compared to random v4 UUIDs, which cause page splits on insertion.

What is the nil UUID?

The nil UUID is all zeros: 00000000-0000-0000-0000-000000000000. It is used as a null or default value in some APIs and protocols, similar to null in databases.

How do I generate UUIDs in different languages?

Python: import uuid; uuid.uuid4(). Node.js: import {randomUUID} from 'crypto'; randomUUID(). Java: UUID.randomUUID(). PostgreSQL: gen_random_uuid(). PHP: Str::uuid() (Laravel) or Ramsey/Uuid library.

How are UUIDs used in REST APIs?

UUIDs are common as resource identifiers in URLs: /users/550e8400-e29b-41d4-a716-446655440000. They allow clients to generate IDs before sending a request (optimistic creation), and they don't expose sequential IDs that reveal how many records exist.

Advertisement

Related

  • Base64 Encode and Decode
  • Password Generator
  • QR Code Generator
  • Regex Tester
Ad
Converter Tools

  • Home


    • Conversions
      • Length Converter
      • Area Converter
      • Volume Converter
      • Color Converter
      • Weight Converter
      • Temperature Converter
      • Angle Converter
      • Time Converter
      • Data Size Converter
      • Energy Converter
      • Number Base Converter
    • Calculators
      • Lengths
        • Feet and Inches Calculator
        • Pythagorean Theorem Calculator
        • Circle Circumference Calculator
        • Circle Area Calculator
        • Triangle Area Calculator
        • Rectangle Area and Perimeter Calculator
      • Percentages
        • What is X% of Y Calculator
        • X is What Percent of Y Calculator
        • Percentage Change Calculator
        • Add or Subtract Percentage Calculator
      • Time
        • Age Calculator
        • Date Difference Calculator
        • Day of Week Calculator
        • Countdown Calculator
        • Week Number Calculator
      • Body indices
        • BMR Calculator
        • TDEE Calculator
        • Ideal Weight Calculator
        • Body Fat Percentage Calculator
        • Waist-to-Hip Ratio Calculator
        • Calorie Deficit Calculator
        • BMI Calculator
      • Finance
        • Tip Calculator
        • Discount Calculator
        • Simple Interest Calculator
        • Compound Interest Calculator
        • Loan Payment (EMI) Calculator
      • Math
        • Quadratic Equation Solver
        • Factorial Calculator
        • GCD and LCM Calculator
        • Prime Number Checker
    • Dev Tools
      • Base64 Encode and Decode
      • Password Generator
      • QR Code Generator
      • Regex Tester
      • UUID Generator
    • Images
      • Image Conversions
      • Image Compression
      • Image Resize
      • Image Grayscale
      • EXIF Reader
      • Image Filters
      • Edge Detection
      • Image Crop
      • Image Rotate & Flip
      • Image Format Info
      • Image Thumbnail
    • File conversions
      • CSV and Excel Converter
    • PDF editing
      • Merge PDFs
      • Split PDF
      • Extract PDF pages
      • Rotate PDF pages
      • Add watermark to PDF
      • PDF metadata
    • Cheatsheets
      • CSS
        • CSS Color Cheatsheet
        • CSS Common Properties Cheatsheet
        • CSS Flexbox Cheatsheet
        • CSS Grid Cheatsheet
      • HTML
        • HTML Cheatsheet
      • Markdown
        • Markdown Cheatsheet
      • Git
        • Git Cheatsheet
      • Regex
        • Regex Cheatsheet
      • Time
        • Unix Timestamp Cheat
    • About
    • Contact
    • Privacy Policy
    • Terms of Use

        Built with by Hugo

        We use cookies and similar technologies for ads (e.g. Google AdSense) and analytics. By continuing you consent to our Privacy Policy. You can change preferences anytime.