Toolvito

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

Your values

One UUID on each line.

MySQL swapped bytes and .NET Guid bytes look like ordinary hexadecimal: choose them yourself.

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.

Convert a column of large CSV files

Convert a column of large CSV files

Choose up to 20 UTF-8 CSV files with a header row, of up to 1 GB each. One column is converted row by row with the rules above; you get each file back with the converted values and a list of values that are not UUIDs.

Or drop files here. CSV, TSV or TXT, up to 20 files, 1 GB each at most.

    The name in the header row. Leave it empty to use a column named uuid, guid or id.

    The box above works in your browser: the values you paste are not sent anywhere. When you use the box below, the files you choose are sent to the Toolvito server. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to use it

    1. Paste one UUID on each line, for example from a query result.
    2. 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.
    3. Choose the form to convert to and press Convert. Copy or download the list.
    4. To see one UUID in every form, with its version and the time inside it, choose See one UUID in every form.
    5. 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, and BIN_TO_UUID must 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.

    Related tools