Calculates on this device. File exports run online.
UUID Database Converter
Paste UUIDs in the form your database or program gives them and choose the form you need. The converter knows the 16-byte form of BINARY(16) and RAW(16) columns, the swapped order of MySQL UUID_TO_BIN(uuid, 1), the byte order of .NET GUIDs, literals for PostgreSQL and Oracle, Base64 and the 128-bit number.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use it
- Paste one UUID on each line, for example from a query result.
- Choose what the values are. Text, ordinary hexadecimal, numbers and Base64 are found by themselves; MySQL swapped bytes and .NET GUID bytes look like ordinary hexadecimal, so choose them yourself.
- Choose the form to convert to and press Convert. Copy or download the list.
- To see one UUID in every form, with its version and the time inside it, choose See one UUID in every form.
- To convert a column of a large CSV export, use the box below.
The forms
- MySQL:
UUID_TO_BIN(uuid)stores the 16 bytes in the order of the text;UUID_TO_BIN(uuid, 1)swaps the time-low and time-high groups, which helps an index only for version 1 UUIDs, andBIN_TO_UUIDmust get the same flag back (MySQL 8.4 Reference Manual). Example: 6ccd780c-baba-1026-9564-5b8c656024db is stored as 0x1026BABA6CCD780C95645B8C656024DB with the flag. - .NET:
Guid.ToByteArray()writes the first four-byte group and the next two two-byte groups in reverse order (Microsoft Learn). Example: 35918bc9-196d-40ea-9779-889d79b753f0 gives C9 8B 91 35 6D 19 EA 40 97 79 88 9D 79 B7 53 F0. - SQL Server: a uniqueidentifier is set from a string constant in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (Microsoft Learn, uniqueidentifier), so the tool writes
CONVERT(uniqueidentifier, '...'). PostgreSQL has a uuid type that takes the text; Oracle stores UUIDs as RAW(16), written with HEXTORAW. - Version and variant are fields of RFC 9562. Versions 1 and 6 hold a time in 100-nanosecond steps from 15 October 1582 and a node; version 7 holds Unix milliseconds; version 4 is random.
Limits
- The tool converts values; it does not connect to a database. Check one known value of your table before you convert a whole column.
- A node in a version 1 UUID may be a network card address or a random number; the multicast bit tells which is likely.