Skip to main content
Utily
Developer Tools

Number Base Converter

Type a number in the base you have — binary, octal, decimal or hex — and read it out in all the others at once, live on every keystroke. Any base from 2 to 36, grouped digits, strict validation, and nothing leaves the page.

Binarybase 2

1101 1110 1010 1101 1011 1110 1110 1111

32 bits

Octalbase 8

33653337357

11 digits

Decimalbase 10

3735928559

32 bits of the 53 that are exact

Hexadecimalbase 16input

dead beef

8 digits

Any base from 2 to 36

2–36
Base 323farfnf

7 digits in base 32

Copy buttons copy the ungrouped digits — grouping is display only. Values are accepted up to 9,007,199,254,740,991 (2^53 − 1), the largest integer JavaScript holds exactly.

How it works

  1. 1

    Pick the base you are typing in

    Four tabs under the input set which alphabet your digits use: binary, octal, decimal or hexadecimal. The choice applies to the input only — every output base is shown at once, all the time.

  2. 2

    Type the number

    The conversion runs on every keystroke. Validation is strict and explains itself: a digit outside the chosen base is named, and the tool states exactly which characters that base accepts. Nothing is stripped — spaces, signs and separators are digits this tool does not read, and it says so rather than guessing.

  3. 3

    Read all four bases at once

    Binary, octal, decimal and hexadecimal cards update together, each with its own copy button, and the card matching the base you typed in is marked as the input. The decimal card reports how many of the 53 exactly-representable bits the value uses, so you can see the 2^53 − 1 ceiling approaching rather than hitting it.

  4. 4

    Add a custom base or group the digits

    The stepper under the grid picks any base from 2 to 36 and renders its own card for it — base 32 and base 36 identifiers included. The grouping toggle chunks binary and hex in fours so long values can be read in bites instead of one unbroken string.

Positional notation: what a base is

Every number system you have ever used rests on one idea: a digit's worth depends on where it sits. Write 10 and you have not written 'one and zero' but 'one ten and no units' — the 1 borrows its weight from its position. The base names the exchange rate between neighbouring positions. Base 2 pays out in powers of two, base 8 in powers of eight, base 10 in powers of ten, base 16 in powers of sixteen. Bases above 10 need more digits than the alphabet of arithmetic provides, so letters join in: in hexadecimal a is ten, and by base 36 the letter z stands for thirty-five.

Reading a value out of its base is therefore just multiplication and addition, one term per digit. Take 1010 in binary — the same digits that mean 'ten' in decimal:

DigitPositionPosition worthContributes
13rd from the right2^3 = 88
02nd from the right2^2 = 40
11st from the right2^1 = 22
00th from the right2^0 = 10

Eight plus two is ten, so 1010 in base 2 and 10 in base 10 are the same value in two costumes. The reverse direction — producing the digits in the first place — is the same table read backwards: divide by the base, keep the remainder as the next digit, and continue with the quotient until it runs out. That loop is all any base converter does, in either direction, and it is why the four cards on this page can all update from one keystroke.

Worked example: dead beef → 3735928559

Dead beef is the classic hex constant — a deliberately friendly-looking value that has padded debug screens and test suites for decades — and it makes a tidy demonstration because it exercises letters and digits at once. Grouped display writes it dead beef: two bytes per group. To read it as a decimal number, put each digit on its position and multiply, exactly as the binary example did, with sixteen as the base:

Hex digitValuePositionContributes
d1316^7 = 2684354563489660928
e1416^6 = 16777216234881024
a1016^5 = 104857610485760
d1316^4 = 65536851968
b1116^3 = 409645056
e1416^2 = 2563584
e1416^1 = 16224
f1516^0 = 115

The eight contributions sum to 3735928559 — that is the decimal card's answer, and it is the number the RGB dot-chaser of every 1990s demo scene was secretly writing. The conversion is lossless in both directions: feed 3735928559 back in on the decimal tab and the hexadecimal card returns dead beef again. Notice also what the table shows about length: four bytes of information, eight hex digits, and ten decimal digits. Hex stays close to the machine's own grouping, which is precisely why engineers write values this way and why the grouped toggle exists.

Why hexadecimal is the programmer's base

Computers store bits, humans chunk, and hexadecimal is the compromise both can keep. The binding constraint on the machine side is the byte: memory, files and network traffic are all addressed in units of 8 bits. The binding constraint on the human side is that a row of fifty binary digits cannot be read, compared or dictated over a call. Hex resolves the tension because its digits split the byte exactly — one hex digit carries 4 bits, so a byte is always two hex digits and nothing is ever left over. Decimal has no such alignment: 255 needs three digits where ff needs two, and the decimal digits of a large value say nothing about where its bytes begin and end.

Hex digitDecimal4 bits
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
a101010
b111011
c121100
d131101
e141110
f151111

That table is the entire translation layer between binary and hex, and it is small enough to memorise — sixteen rows, and only the last six are anything new. Once it is internalised, hex stops being a foreign notation and becomes binary with the redundancy removed: #ff0000 is eight switched-on bits followed by sixteen switched-off ones, 0x80 is a byte with only its top bit set, and a v4 UUID's 4 at position fourteen is four known bits, not a mystery character. Every hex value on this page can be checked against this table by eye, which is a quiet part of why the notation has outlived octal as the programmer's default.

The 2^53 − 1 ceiling

Every number on this page is a JavaScript number, and JavaScript numbers are IEEE-754 doubles: 64 bits split into a sign, an exponent and a 53-bit fraction. When the value is an integer, those 53 fraction bits are the entire precision budget, which sets a hard frontier at 2^53 − 1 — 9007199254740991, given its own name, Number.MAX_SAFE_INTEGER. It is called safe because every integer up to it has a unique representation; past it, consecutive integers begin to share one.

The failure is worth seeing once, because it is silent. Ask a console for 9007199254740992 === 9007199254740993 and it answers true: the last binary digit of the larger value simply never got stored, and both constants collapsed into the same double. A converter that accepted such input would then print digits with total confidence — the leading digits correct, the tail invented — and nothing in the output would warn you. In hex the frontier sits at 1fffffffffffff, fourteen digits; in binary, fifty-three ones.

Input (decimal)Verdict
9007199254740990converted — below the ceiling
9007199254740991converted — this is 2^53 − 1 itself, the exact frontier
9007199254740992rejected — one past it, and 9007199254740993 would read back the same

The guard is applied per digit rather than to the finished value, because the finished value is exactly where precision would already be lost: the tool checks the running total against the remaining digits before every multiply-and-add step, so an oversized input is caught at the first digit that would push it past the ceiling. For anything larger, JavaScript's BigInt type removes the ceiling entirely at the cost of leaving ordinary number arithmetic — a different tool with different rules, and the honest boundary of this one.

Frequently asked questions

What does the base actually change about a number?
Nothing about the quantity — only its spelling. The value you call ten is one number wearing four costumes: 10 in decimal, 1010 in binary, 12 in octal and a in hexadecimal. A base is an agreement about what each digit position is worth: in base 10 the positions are worth 1, 10, 100 and so on; in base 2 they are worth 1, 2, 4, 8; in base 16 they are worth 1, 16, 256. Converting between bases is therefore translation rather than calculation — the value never changes, only which digits stand in which positions. That is why this page updates all of the bases at once from a single input: there is only one number on the page, and everything you see is a different way of writing it.
Why is hexadecimal everywhere in programming?
Because hex digits line up with bytes and decimal digits do not. A byte is 8 bits; a hex digit is exactly 4 bits; so every byte is exactly two hex digits, and 11111111 becomes ff without any counting or arithmetic. Decimal cannot do this — 255 takes three digits, and the decimal digits of a number say nothing about where its byte boundaries fall. That alignment is why memory addresses, color codes, MAC addresses, UUIDs and hash digests are all written in hex: a color like #1a2b3c is three bytes you can read straight off the surface, two hex digits per byte, and a 32-character hex string is a value you can trust to be exactly 16 bytes.
Why do the grouped digits come in fours?
Because four is the chunk size where the bases translate into each other. Four binary bits are exactly one hex digit, so splitting a binary string into groups of four from the right turns it into a lookup table for its own hex form: 1111 1111 reads group by group as f and f, giving ff — no arithmetic, just substitution running right to left. The same four-digit chunking applied to hex puts two bytes in each group, which is how the classic constants are conventionally written: dead beef, not de ad be ef. The grouping toggle applies both, so a long binary value and its hex twin break at matching points and the eye can check one against the other.
Why does the converter refuse numbers above 9,007,199,254,740,991?
Because past that point the digits stop being real. JavaScript stores every number as an IEEE-754 double, a 64-bit format in which 53 bits carry the integer part; 2^53 − 1, which reads 9007199254740991, is the last integer with all 53 bits available, and it is enshrined as Number.MAX_SAFE_INTEGER. One step further is the classic demonstration: 9007199254740992 and 9007199254740993 are the same double, as any console will confirm — the final binary digit simply has nowhere to live. A converter that kept going would cheerfully emit digits that were never stored, which is worse than an error because nothing marks it as wrong. This tool checks the running total before every digit is absorbed and stops at the boundary instead; for larger values you need a BigInt-based tool, which trades this limit for a different set of rules.
What are the unusual bases, like 32 and 36, actually for?
Compact identifiers that survive being typed, read aloud and stored anywhere. Base 36 spends the digits 0-9 and the letters a-z — the one alphabet every keyboard, filename and URL agrees on — with no mixed case, no punctuation and no padding, which makes it the densest form a number can take under those constraints: the value dead beef in hex, 3735928559 in decimal, shortens to 1ps9wxb in base 36. That is why URL shorteners, document IDs and package names reach for it. Base 32 makes the opposite trade: it wastes a little space to use only uppercase letters and digits, and variants such as Crockford base32 drop I, L, O and U entirely so a human transcribing an ID by hand cannot confuse them with 1 and 0. Both exist for the same reason — a number that has to travel through humans as well as machines.
Does anything I type leave my browser?
No. The conversion is arithmetic performed by JavaScript in the page on the characters you have typed, with no network request attached to any part of it — there is no endpoint to submit to, no queue, and no log of the values you enter. Disconnect from the network after the page loads and every panel, including the custom-base card, keeps working exactly as before. That matters less here than it does for a password or a token, but the rule is the same across the site's developer tools: the numbers you paste, whether they are memory addresses from a debugging session or identifiers from a private system, are not transmitted anywhere by using this page.

Related tools

Last updated: October 9, 2026