UUID to integer converter
550e8400-e29b-41d4-a716-446655440000 is the 128-bit integer 113059749145936325402354257176981405696: paste a UUID, a decimal integer or a hex string and get all three forms of the same bits, plus the version and variant. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Value
- 550e8400-e29b-41d4-a716-446655440000
- Uuid
- 550e8400-e29b-41d4-a716-446655440000
- Integer
- 113059749145936325402354257176981405696
- Hex
- 550e8400e29b41d4a716446655440000
- Hex prefixed
- 0x550e8400e29b41d4a716446655440000
A UUID is a one-hundred-twenty-eight-bit identifier usually written as thirty-two hexadecimal digits grouped eight-four-four-four-twelve with hyphens. Databases, queues, and compact indexes often store the same bits as an unsigned integer or as a bare hex string, and comparing those forms by eye is a common source of bugs. This UUID to integer converter accepts a hyphenated UUID, a 128-bit decimal integer, or a hexadecimal representation and returns all three from the same bit pattern. The mapping is the RFC 4122 big-endian layout: concatenate the sixteen bytes and read them as an unsigned 128-bit integer.
What a UUID integer is and how the bits map
RFC 4122 and ITU-T X.667 define a UUID as exactly sixteen octets. In the familiar hyphenated spelling those octets appear as thirty-two hexadecimal digits in the groups 8-4-4-4-12. Reading the same sixteen bytes as one unsigned integer in network (big-endian) order is the UUID-to-integer mapping used by this converter and by common libraries such as Python’s uuid.UUID integer constructor.
The first eight hex digits are the most significant thirty-two bits; the last twelve hex digits are the least significant forty-eight bits. That is not the mixed-endian in-memory GUID layout used by some Microsoft APIs, where the first three fields are stored little-endian: this tool never swaps those fields, so a hyphenated string always produces the same integer you would get by concatenating the hex and parsing it as base sixteen.
Version lives in the high nibble of the seventh byte (the character at hex index twelve) and variant lives in the high bits of the ninth byte (hex index sixteen). Those fields are reported so you can see whether a value is an RFC 4122 UUID, an NCS reserved form, a Microsoft variant, or another reserved pattern, without changing the integer. The nil UUID is the integer zero.
The maximum UUID, thirty-two f characters, is two to the one hundred twenty-eight minus one.
What you can do with it
Compact database and BINARY(16) storage
Turn a hyphenated UUID from application logs into the exact 128-bit integer or 32-digit hex your table or BINARY(16) column stores.
FAQ
Can I convert the other way, from integer or hex back to a UUID?
Yes. Pass a decimal integer string or hex (optional 0x, at most 32 digits). The same bit pattern is returned as a hyphenated UUID, decimal, and hex.
Is this the Microsoft mixed-endian GUID memory layout?
No. The integer is the RFC 4122 / ITU-T X.667 big-endian reading of the sixteen bytes. The first three hyphenated fields are not byte-swapped.
What integer does 550e8400-e29b-41d4-a716-446655440000 correspond to?
It is 113059749145936325402354257176981405696, and its compact hex is 550e8400e29b41d4a716446655440000. The tool also reports that it is a version 4 UUID with the RFC 4122 variant.
Why is the decimal result shown as text rather than a number?
Because JavaScript numbers lose accuracy above two to the 53 minus one, while a UUID can reach two to the 128 minus one. Returning the decimal as text keeps every digit exact, so no bits are lost.
What are the smallest and largest possible values?
The nil UUID, all zeros, is the integer 0. The largest, 32 f characters, equals two to the 128 minus one. Any decimal integer you enter must fall between those two limits.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/uuid-to-integer \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"value":"550e8400-e29b-41d4-a716-446655440000"}'const res = await fetch("https://api.kit.forhosting.com/dev/uuid-to-integer", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"value": "550e8400-e29b-41d4-a716-446655440000"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/uuid-to-integer",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"value": "550e8400-e29b-41d4-a716-446655440000"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/uuid-to-integer", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"value":"550e8400-e29b-41d4-a716-446655440000"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"value":"550e8400-e29b-41d4-a716-446655440000"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/uuid-to-integer", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"value": "550e8400-e29b-41d4-a716-446655440000"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.uuid_to_integer",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What a UUID integer is and how the bits map
Because JavaScript numbers lose integers above two to the fifty-three minus one, the decimal form is always returned as an exact string; a numeric decimal_number field appears only when the value is a safe integer.
Input contract, accepted formats, and the response shape
Optional from defaults to auto and may be uuid, integer, or hex when you need to force a parse. Hyphenated input is case-insensitive and is always echoed back in canonical lowercase. Decimal integers may carry a leading plus and must lie between zero and two to the one hundred twenty-eight minus one inclusive. Example: value 550e8400-e29b-41d4-a716-446655440000 is a version-4 RFC 4122 UUID whose hex is 550e8400e29b41d4a716446655440000. POST a JSON body with required field value: the identifier in any supported spelling. Auto detection prefers a hyphenated UUID, including an optional urn:uuid: prefix or wrapping braces; then a 0x-prefixed hex string; then a compact thirty-two-digit hex string (the unhyphenated UUID); then a decimal integer; then a shorter hex run padded on the left to thirty-two digits. Aliases uuid, text, input, and id are accepted for value, and format or mode for from. JSON numbers are accepted only when they are safe integers; wider 128-bit values must arrive as strings so no bits are lost. Missing value, empty strings, negative integers, more than thirty-two hex digits, and text that matches none of the three forms fail with invalid_input naming the problem—those failures are not billed. On success the body includes uuid (canonical hyphenated lowercase), integer (exact decimal string), hex (thirty-two lowercase digits), hex_prefixed (the same digits with a 0x prefix), input_format (uuid, integer, or hex), version (0–15), variant (ncs, rfc4122, microsoft, or reserved), and bit_width 128.
Where a UUID-to-integer converter earns its keep
Teachers explaining identifier layout can keep the bits fixed and show how version and variant sit inside the same 128-bit word. Failed validation does not consume balance. Keep requests to a single identifier, pin uuid, integer, and hex in your tests, and you get reproducible conversions for migrations, compact storage, and cross-format comparison without standing up a UUID library in every service you ship. Relational schemas that store identifiers as unsigned 128-bit integers or as BINARY(16) need a deterministic way to round-trip the hyphenated form developers copy from logs. Message buses and warehouse keys often compare a compact hex column with a dashed UUID from an upstream API; converting both to the same integer (or the same thirty-two-digit hex) avoids false mismatches caused by case, braces, or a urn:uuid: prefix.
Integration use cases
Cross-format identifier comparison
Normalize dashed UUIDs, 0x hex literals, and decimal keys to one integer so warehouse joins and API diffs do not fail on spelling.
Fixtures and multi-language test oracles
Generate a canonical uuid / integer / hex triple and assert every client library encodes the same RFC 4122 big-endian bits.
Technical questions
How do I convert a UUID to a 128-bit integer?
Send value as a hyphenated UUID (optional urn:uuid: or braces). The API returns integer as an exact decimal string plus hex and the canonical lowercase UUID.
Why is the integer a string instead of a JSON number?
Most UUIDs exceed JavaScript’s safe integer range (2^53−1). The decimal string is always exact. decimal_number is included only when the value is a safe integer.
What does the UUID to integer converter cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.