Number Base Converter
Convert between binary, octal, decimal, hex, and any arbitrary radix from 2 to 36. Handles BigInt-sized numbers.
About the Number Base Converter
The Number Base Converter turns a single integer into its binary, octal, decimal, and hexadecimal forms at once, plus any radix from 2 to 36. It solves the constant friction of reading a value written in one base when you need it in another: a hex color, a permission bitmask, an octal file mode, or a register dump. You type one number, pick the base it is written in, and every equivalent appears together.
You type an integer into the input field and choose its source base with the Binary, Octal, Decimal, or Hexadecimal button. The tool parses that text into a BigInt, so a 200-digit number converts as cleanly as 42. Spaces and underscores are ignored, and a leading 0b, 0o, or 0x prefix is stripped automatically. The four conversions render immediately below, each with its prefix, and an error line appears if a digit does not fit the base you selected.
This converter is free, needs no account, and runs entirely in your browser. Nothing you type is sent to a server; the parsing and base math happen in local JavaScript on your machine. That means it works offline once the page has loaded, and the numbers you paste, including anything sensitive from a debugging session, never leave the tab. There is no character cap and no signup wall between you and the result.
How to use the Number Base Converter
- 1Type or paste your integer into the Input number field.
- 2Click the Binary (2), Octal (8), Decimal (10), or Hexadecimal (16) button to set which base your input is written in.
- 3Read the Conversions panel below, where each of the four bases shows the equivalent value with its 0b, 0o, or 0x prefix.
- 4Set the Custom base number field to any radix from 2 to 36 to see that representation.
- 5Tap any conversion row, or the custom-base result, to copy that value to your clipboard.
- 6Watch for the red 'Not a valid base-N number' warning, which means a digit in your input does not belong to the selected source base.
What you can use it for
Reading a color hex
A CSS color like 0xff8800 needs to become separate red, green, and blue decimal channels. Enter the hex value, pick Hexadecimal as the source, and read the Decimal row to check each byte against what your design tool reports.
Checking Unix file modes
You have an octal permission value such as 755 and want the raw bits. Select Octal, type the number, and the Binary row shows the permission pattern so you can confirm which read, write, and execute flags are set.
Base-36 short IDs
Some systems encode counters as base-36 strings to keep them short. Convert a decimal ID by setting the Custom base field to 36 and copying the result to see the shorter encoded form.
Frequently asked questions
Does my input get sent anywhere?
No. The converter parses and converts entirely in your browser using JavaScript. No number you type is transmitted to any server or logged. Once the page has loaded you can disconnect from the network and it keeps working, which makes it safe for values pulled from private debugging output.
How large a number can it handle?
The tool parses your input into a BigInt rather than a fixed-width integer, so there is no practical upper bound tied to 32 or 64 bits. A number with hundreds of digits converts without overflow or precision loss. Long results wrap across lines so you can still read and copy every digit.
Can I convert from a custom base like base 5?
Not for input. The source base is chosen from the four buttons: binary, octal, decimal, or hexadecimal. The Custom base field from 2 to 36 only controls an additional output representation. So you can convert a decimal number into base 5, but you cannot currently type a base-5 number as your starting value.
Why does it say 'Not a valid base-N number'?
That warning means a character in your input is not a legal digit for the source base you selected. For example, the digit 9 while Octal is active, or the letter g while Hexadecimal is active, triggers it. Check that every character fits the chosen base; spaces and underscores are allowed as separators.
Can I paste a number with a 0x or 0b prefix?
Yes. A leading 0b, 0o, or 0x prefix is stripped automatically before parsing, so pasting 0xFF with Hexadecimal selected works the same as pasting FF. Spaces and underscores anywhere in the value are also removed, so grouped input like 1010_1100 converts cleanly.
In what case are hex letters shown?
Converted output uses lowercase letters, so hexadecimal 255 displays as ff and a base-36 value uses a through z. Input is case-insensitive, so FF or ff both parse identically. If your target format requires uppercase, copy the value and change the case afterward.