Number Base Converter

Convert binary, octal, decimal and hex online free — any base from 2 to 36, exact for numbers of any size, with fractions and two's complement. Runs in your browser.

Runs in your browserNothing uploadedFree · no signup

Every conversion here runs on arbitrary-precision integers, so a 64-bit hash, a snowflake ID or a 128-bit UUID converts exactly. Converters built the usual way — on JavaScript's parseInt — round every value above about 9 quadrillion, which turns 0xFFFFFFFFFFFFFFFF into a 1 followed by 64 zeros instead of 64 ones. Spaces, underscores and commas in the input are ignored, so you can paste a grouped value straight in; use a dot for the point.

Frequently asked questions

How do I convert binary to decimal?
Set the input base to 2, paste or type the binary digits, and read the Decimal row. Spaces and underscores are ignored, so a grouped value like 1010 1010 pastes straight in and converts to 170. The same page gives you octal and hexadecimal at the same time, and every row has its own Copy button.
Why do other converters get large numbers wrong?
Because they are built on JavaScript's parseInt and toString, which run every value through a 64-bit floating point number. That holds whole numbers exactly only up to about 9 quadrillion (2 to the power 53), and silently rounds everything above it. Ask one of those converters for 0xFFFFFFFFFFFFFFFF in binary and it answers with a 1 followed by 64 zeros, when the real answer is 64 ones. This tool uses arbitrary-precision integers instead, so a 64-bit hash, a snowflake ID or a 128-bit UUID converts exactly however long it is.
Can it convert numbers with a decimal point?
Yes, and it does the arithmetic exactly rather than through a float. Type 10.625 in base 10 and you get 1010.101 in binary. Where an expansion never ends it is shown with the repeating run in brackets — 0.1 in decimal is 0.0(0011) in binary, because one tenth has no exact binary form. That is the honest answer; a converter that prints a tidy 55-digit number there is showing you the binary of the nearest floating point number, not of a tenth.
How do I get the binary of a negative number?
Type it with a minus sign. The main rows show the sign and the magnitude, which is how a number is written on paper, and a Two's complement panel appears underneath with the actual stored bit pattern at 8, 16, 32 and 64 bits — the form a computer uses. A value that will not fit in a width says so instead of quietly wrapping around, so -200 is reported as outside the 8-bit range rather than shown as 0x38.
What bases does it support?
Every base from 2 to 36, using the digits 0-9 then a-z. Binary, octal, decimal and hexadecimal are always shown, and the 'Also show base' box adds any other one — base 36 for short IDs, base 32, base 12, or whatever your assignment asks for.
Is anything I type uploaded?
No. The conversion runs entirely in your browser, so a key, a hash or an internal ID never leaves your device. There is no signup and nothing is stored.