Number Base Converter
Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36. Flip on signed mode to see how two's complement actually works, and never worry about a number too large to convert exactly.
Click any value to load it into the converter above.
How to Convert a Number Base
Features
The Same Eight Bits, Two Different Numbers
Type 11111111 into an unsigned 8-bit field and it means 255. Type the exact same eight bits into a signed field and it means β1. Nothing about the bits themselves changed β a bit pattern has no inherent sign, only whatever meaning the system reading it has agreed to assign. That agreement is called two's complement, and it's how essentially every processor built since the 1970s represents negative integers: the leading bit acts as a sign flag, and a negative value is stored as "the amount you'd need to add to wrap back around to zero" rather than a separate minus symbol. It sounds abstract until it causes a real bug β an unsigned integer overflow that silently becomes a huge positive number, or a byte value that flips negative the moment the 128s place fills in β which is exactly the class of error this tool's signed mode exists to make visible instead of mysterious.
Why Hexadecimal Exists At All
Binary is how computers actually store everything, and binary is nearly unreadable to a human past about eight digits. Decimal 255 is a clean two keystrokes; the same value in binary is 11111111, eight digits that are easy to miscount at a glance. Hexadecimal exists specifically to solve that without losing the direct relationship to binary: exactly four binary digits map to exactly one hex digit, so that same value collapses to a tidy FF, and the translation back to binary is mechanical rather than requiring a calculation. That clean 4-bit alignment is the entire reason memory addresses, colour codes, hash digests, and byte values are written in hex rather than decimal β it isn't an arbitrary programmer preference, it's the one non-binary base that maps onto binary with zero rounding or awkwardness. That same pairing shows up everywhere once you know to look for it β a MAC address is six hex byte-pairs separated by colons, an IPv6 address is eight groups of four hex digits, and a SHA-256 hash is a 256-bit number written out as 64 hex characters specifically because hex is the most compact way to write raw binary data without losing the bit-level correspondence a programmer needs.
A Sysadmin, a Web Developer, and a Debugger
A sysadmin running chmod 755 on a file is really setting three 3-bit binary flags at once β 7 (111) grants read, write, and execute; 5 (101) grants read and execute without write β and octal exists as a unit specifically because 3 bits map onto exactly one octal digit, the same clean relationship hex has with 4 bits. A web developer picking a brand colour types #2563EB without necessarily thinking about it as three separate byte values β 37 red, 99 green, 235 blue β each one a two-digit hex pair for exactly the reason bytes and hex pairs were made for each other. And a developer chasing a bug where a counter that should be positive suddenly reads as a huge negative number flips on this tool's signed mode, pastes in the raw hex value from a memory dump, and sees immediately that the top bit was set β the entire mystery resolved in the time it takes to paste one value in and flip a switch, rather than working through the wraparound arithmetic by hand.
Beyond Hex: Base-32, Base-36, and Custom Radixes
Hex and octal cover most everyday needs, but the converter goes further because real systems occasionally need to. Base-32 β typically 0β9 and AβV, or a variant avoiding visually confusable characters like 0/O and 1/I β shows up in TOTP authenticator codes and some case-insensitive identifier schemes, where a shorter string than hex and a smaller alphabet than base-36 is the goal. Base-36, using the full alphanumeric set (0β9 and AβZ), is the most compact base that sticks to unambiguous printable characters, which is exactly why URL shorteners, serial numbers, and license keys lean on it β converting a large decimal ID into base-36 can shrink it by several characters with no loss of information. Beyond even those, the custom base field accepts anything from base 2 to base 36, useful for anyone working with a bespoke encoding scheme that doesn't match a named standard β a puzzle, a legacy system, or a teaching example built around an unusual radix on purpose.
Built Not to Round, and Not to Hide the Working
Most base converters are built directly on JavaScript's native number type, which silently loses precision past 2β΅Β³ β about 9 quadrillion β a limit that matters more than it sounds once large cryptographic values, factorials, or arbitrary-precision computations enter the picture. This converter runs on BigInt arithmetic throughout instead, so there is no upper size where results start quietly rounding. Underneath the main result, a Calculation Steps panel shows the actual digit Γ base^position expansion behind every conversion rather than just the answer, which matters for anyone checking their own manual working or teaching the concept rather than just needing the number. And a Common Reference Values panel below the converter β maximum 8/16/32/64-bit values, white in hex, a Unix permission code β loads straight into the main tool with one click, useful as both a sanity check and a fast way to explore how bit width actually constrains a number's range.
What This Converter Won't Debug
This tool converts integers between bases β it does not parse or validate floating-point formats like IEEE 754, so it won't help decode a raw float's bit pattern into a decimal value, which needs a purpose-built float-bit calculator instead. It also doesn't perform bitwise operations β AND, OR, XOR, shifts β it shows you a number in different bases, not the result of combining two of them. And it has no awareness of what a hex string actually represents beyond its numeric value: it will convert a SHA-256 digest or a UUID as a (very large) number without validating that the format is correct or meaningful, since that validation is a different job entirely. Nothing typed here is sent anywhere: the arithmetic runs as plain JavaScript inside the browser tab, with no server call and nothing logged, which matters for memory addresses, cryptographic key fragments, or proprietary identifier schemes as much as for a homework problem, and the tool keeps working identically with no internet connection at all once the page has loaded. For anything with security consequences riding on it β validating a hash, generating a cryptographic key β treat this as an arithmetic reference, not a substitute for a proper cryptography library.