Guides

How to Extract UUIDs & GUIDs from Text, Logs & SQL Dumps Online

To extract all 128-bit UUIDs (Universally Unique Identifiers) and Microsoft GUIDs (`8-4-4-4-12` canonical hexadecimal format) from application logs, stack traces, or SQL dumps, scan the text against RFC 9562 / RFC 4122 bit-layout patterns directly in your browser using the EasyExtract UUID & GUID Extractor. It captures UUIDv1 through UUIDv8 (including time-ordered UUIDv7 and Nil UUIDs), normalizes casing, and exports deduplicated lists or SQL-ready lists 100% locally in browser RAM with zero server uploads.

In distributed microservices, PostgreSQL databases, AWS CloudWatch logs, Kubernetes pod events, and Microsoft Azure Active Directory (Entra ID), every entity—from a user account or payment transaction to an OpenTelemetry trace span—is identified by a 36-character **UUID** like `550e8400-e29b-41d4-a716-446655440000`. When debugging a production incident, engineers frequently need to pull hundreds of transaction UUIDs out of raw log lines to run a batch SQL query (`WHERE id IN (…)`) without manually copying and pasting each ID.

This guide explains the structure of RFC 9562 UUIDs (including the version and variant nibbles) and shows you how to extract and deduplicate UUIDs/GUIDs in seconds.

Anatomy of a 128-Bit UUID / GUID (RFC 4122 & RFC 9562)

Standardized by the IETF in RFC 4122 and updated in May 2024 by RFC 9562 (which introduced time-ordered **UUIDv7** for high-performance database B-tree indexing), a canonical UUID consists of 32 hexadecimal digits arranged in 5 hyphen-separated groups (`8-4-4-4-12`, 36 characters total):

xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
   8      4    4    4        12
  • The `M` Nibble (13th Hex Digit — Version): Indicates the UUID generation algorithm:
    • 1: **UUIDv1** (Gregorian timestamp + IEEE 802 MAC address).
    • 4: **UUIDv4** (122 bits of cryptographically random entropy — most common in web APIs).
    • 5: **UUIDv5** (SHA-1 namespace hash).
    • 7: **UUIDv7** (48-bit Unix epoch millisecond timestamp + random bits — modern database primary key standard).
  • The `N` Nibble (17th Hex Digit — Variant): For standard RFC 4122/9562 UUIDs, the top two bits are `10`, meaning `N` is always **`8`, `9`, `a`, or `b`** (though Microsoft COM/Registry GUIDs and legacy systems occasionally use `c`/`d` or arbitrary hex nibbles).

Method 1: Extract & Deduplicate UUIDs Online in Your Browser (Zero Uploads)

To pull every UUID or GUID out of a log file, JSON dump, or CSV snippet without exposing production IDs to a third-party server:

  1. Open the free UUID & GUID Extractor on EasyExtract.
  2. Paste your log lines, SQL query output, or JSON payload into the text box.
  3. Instant Extraction & Normalization: The extractor captures standard `8-4-4-4-12` UUIDs (including Microsoft `{…}` brace-wrapped GUIDs), lets you normalize to lowercase or uppercase, and removes duplicates in one click.
  4. Copy the extracted UUIDs to your clipboard or download them as a `.txt` or `.csv` file.
Identifier Type Character Length / Pattern Recommended EasyExtract Tool
UUID / GUID (v1–v8, Nil) 36 chars (`8-4-4-4-12` hex with hyphens) UUID & GUID Extractor
Cryptographic Hashes (MD5, SHA-1, SHA-256) 32, 40, or 64 contiguous hex characters MD5 / SHA Hash Extractor
JSON Web Tokens (JWT) `eyJ…` three-part Base64URL string JWT Token Extractor & Decoder

Method 2: Regex Patterns for UUIDs (`grep`, Python & JavaScript)

Depending on whether you want to match **strictly RFC-compliant UUIDs** or **any 8-4-4-4-12 GUID**, use one of these two patterns:

1. General 8-4-4-4-12 UUID / Microsoft GUID Regex (Recommended for Logs)

\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b

2. Strict RFC 9562 Version 1–8 + Variant Regex

\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}\b

Frequently Asked Questions

What is the difference between a UUID and a GUID?

Structurally, they are identical 128-bit numbers formatted as `8-4-4-4-12` hexadecimal strings. **UUID** (Universally Unique Identifier) is the open IETF/ISO standard term (RFC 4122 / RFC 9562), while **GUID** (Globally Unique Identifier) is Microsoft’s term used across Windows Registry keys, `.NET` (`System.Guid`), SQL Server (`uniqueidentifier`), and Active Directory—often wrapped in curly braces like `{550E8400-E29B-41D4-A716-446655440000}`.

Does the extractor match the Nil UUID (`00000000-0000-0000-0000-000000000000`)?

Yes. Both the Nil UUID (all zeros) and the Max UUID (`ffffffff-ffff-ffff-ffff-ffffffffffff` defined in RFC 9562) are recognized.

Are my production logs uploaded to any server?

Never. All extraction happens 100% locally in your browser’s JavaScript runtime.

Shah Abrar Ahmad - Founder & Lead Engineer
Lead Architect & Founder

Software architect and technical web engineer specializing in browser-based zero-knowledge file parsing, technical SEO, and data extraction security. Built EasyExtract to give users 100% private in-browser tools with zero cloud uploads.

Keep reading