Base64 UUID Generator & Converter

Generate and convert 128-bit UUIDs to compact standard and URL-safe Base64 strings in real time.

Converted Representations Generated entirely in your browser using secure CSPRNG. No data is sent over the network.
URL-Safe Base64 (22 chars, RFC 4648) 22 chars • Recommended for URLs
nB16ZAPvRbSp79BjahRYBg
Standard Base64 (24 chars with ==) 24 chars • RFC 4648
nB16ZAPvRbSp79BjahRYBg==
Canonical UUID (RFC 4122 / 9562) 36 chars
9c1d7a64-03ef-45b4-a9ef-d0636a145806
Raw 16-Byte Hex (32 chars) 32 chars hex
9c1d7a6403ef45b4a9efd0636a145806
Technical Reference

What is a Base64 UUID?

Generate and convert 128-bit UUIDs to compact standard and URL-safe Base64 strings in real time.

What is a Base64 UUID?

A Base64 UUID is a 128-bit Universally Unique Identifier encoded into a 22-character or 24-character Base64 representation instead of the standard 36-character hexadecimal string. By encoding the 16 raw binary bytes directly into Base64 (6 bits per character), a Base64 UUID reduces string length by 38% while retaining exact 128-bit cryptographic uniqueness and reversibility.

How UUID to Base64 Conversion Works

A standard canonical UUID consists of 16 bytes (128 bits). Base64 encoding groups these 128 bits into chunks of 6 bits, producing 21 full 6-bit characters plus 2 leftover bits (22 characters). With standard RFC 4648 padding, two equals signs ("==") are appended for a 24-character string. When padding is omitted, an ultra-compact 22-character string represents the identical 128-bit payload with zero data loss.

Standard Base64 vs. URL-Safe Base64 (RFC 4648 §5)

Standard Base64 uses the plus symbol ("+") and forward slash ("/"), which require percentage-encoding (%2B, %2F) in web URLs and query parameters. URL-safe Base64 replaces "+" with hyphen ("-") and "/" with underscore ("_"), allowing direct embedding in REST API endpoints and query strings without escaping.

Key Use Cases for Base64 UUIDs

Base64 UUIDs are widely used in modern web engineering: compact URL slugs (e.g., /items/VQ6EAOKbQdSnFkRmVUQAAA), OAuth and session tokens, distributed tracing trace IDs, API request headers, QR code payloads, and high-throughput logging where saving bandwidth and storage characters matters.

How to Convert UUID to Base64?

Converting a 36-character UUID (e.g., 550e8400-e29b-41d4-a716-446655440000) to Base64 involves parsing the 32 hexadecimal digits into 16 raw binary bytes (128 bits). These bits are grouped into 6-bit chunks, producing a compact 22-character string (or 24 characters with "==" padding). With our tool, simply paste your UUID into the "UUID → Base64" tab or generate a fresh UUID v4 or v7 to instantly get URL-safe and standard Base64 outputs with copy buttons.

How to Convert Base64 Back to UUID?

Base64 is a lossless binary encoding, not a one-way hash. To decode a Base64 UUID back to standard format, the 22 or 24 characters are parsed back into the exact original 16 binary bytes and formatted into canonical 8-4-4-4-12 hex notation (e.g., VQ6EAOKbQdSnFkRmVUQAAA → 550e8400-e29b-41d4-a716-446655440000). Use the "Base64 → UUID" tab above to paste any string for instant validation, error detection, and one-click copying.

Why Use Base64 UUIDs?

Standard hexadecimal UUIDs use 36 ASCII characters. Base64 encoding utilizes 64 distinct alphanumeric characters (A-Z, a-z, 0-9, and two symbols) to pack 6 bits per character instead of 4 bits. This achieves an immediate 38.9% length reduction (22 vs 36 characters) with 100% identical 128-bit cryptographic collision resistance, significantly shortening URLs and reducing network payload overhead.

Where Are Base64 UUIDs Used?

Base64 UUIDs are widely adopted in modern web architectures: clean REST API route slugs (e.g., /orders/VQ6EAOKbQdSnFkRmVUQAAA), compact mobile deep links, OAuth session tokens, distributed tracing trace IDs, HTTP custom headers, and space-constrained QR codes where shorter strings improve scanning reliability.

Base64 UUID vs Standard UUID: Which Should You Use?

Use Standard UUIDs (36-char hex) when storing IDs inside relational databases like PostgreSQL (native UUID column) or MySQL (BINARY(16)) for maximum B-Tree index performance. Use Base64 UUIDs (22-char URL-safe) at the API, network, and frontend presentation layer to deliver cleaner URLs and more lightweight data transfers. Our tool lets you convert effortlessly between both formats in real time.

Base64 UUID Frequently Asked Questions

Instant answers to technical questions regarding Base64 UUID encoding, decoding, and URL safety.

What is a Base64 UUID?

A Base64 UUID is a 128-bit UUID encoded as a 22-character or 24-character Base64 string instead of the traditional 36-character hyphenated hexadecimal format.

How many characters is a Base64 UUID?

A raw 16-byte UUID encodes into 22 characters of Base64. When standard "=" padding is included, it is 24 characters long.

What is the difference between standard and URL-safe Base64 UUIDs?

Standard Base64 uses "+" and "/", while URL-safe Base64 (RFC 4648) replaces them with "-" and "_" so identifiers can be used directly in URLs without URL-encoding.

Is converting a UUID to Base64 completely reversible?

Yes. Base64 is a 100% lossless binary encoding. Any Base64 UUID can be decoded back to its exact canonical UUID representation without any information loss.

Can I use Base64 encoding with UUID v4 and UUID v7?

Yes. Any 128-bit UUID version (v1, v4, v7, etc.) can be converted to and from Base64 because the encoding operates on the underlying 16 raw binary bytes.

Why should I use a Base64 UUID instead of a standard UUID?

Base64 UUIDs are 38% shorter (22 chars vs 36 chars), making them ideal for clean URL paths, mobile deep links, API tokens, and space-constrained network payloads.