A UUID is really just a 128-bit number, and the familiar 36-character string is only one way to write it. This converter turns any UUID into the representations developers actually need for storage, transport, and URLs — right in your browser.
Paste a UUID above to get its binary, hexadecimal, base64, URL-safe base64, byte-array, integer, and URN forms, each with a one-click copy button.
Why convert a UUID?
Storing a UUID as text uses 36 bytes, but storing it as the underlying 16 bytes (BINARY(16) in MySQL, uuid in PostgreSQL) is more compact and faster to index. The binary and byte-array outputs make it easy to see and use that raw form.
Base64 and URL-safe base64 are handy when you need a shorter, transport-friendly encoding — for example, embedding an identifier in a URL, cookie, or JSON payload without hyphens.
The formats explained
Hexadecimal removes the hyphens to give the compact 32-character form. Binary expands the 16 bytes into 128 bits. The byte array lists each of the 16 bytes in decimal, which is useful when constructing a UUID in code.
The 128-bit integer is the UUID interpreted as a single base-10 number, and the URN form (urn:uuid:…) is the IETF-registered URI representation. URL-safe base64 swaps + and / for - and _ and drops padding so the value is safe to drop straight into a URL.
Frequently asked questions
- How do I convert a UUID to binary?
- Paste the UUID above. The tool expands its 16 bytes into 128 bits and also gives you the raw byte array, which is what you store in a BINARY(16) column.
- How do I convert a UUID to base64?
- The converter encodes the UUID’s 16 bytes as base64 and as URL-safe base64 (using - and _ with no padding) so you can copy whichever your system needs.
- Should I store UUIDs as binary or text?
- Binary (16 bytes) is more compact and indexes faster than the 36-character text form. Use your database’s native uuid type when available, or BINARY(16) otherwise.
