Number Base Converter
Convert a number between binary, octal, decimal, and hexadecimal, all four shown at once.
Input base
Converted to every base live as you type, all in your browser.
Results
How to convert between binary, decimal, and hex
Pick the input base
Select binary, octal, decimal, or hexadecimal to tell the converter how to read your number.
Type the value
Enter the number. Code-style prefixes like 0b, 0o, and 0x are accepted, spaces are ignored, and a minus sign is kept.
Copy the results
All four bases update live as you type. Copy a single base with its row button, or use Copy all bases for the full set.
Why use this tool
All four bases at once
Binary, octal, decimal, and hexadecimal are shown together, so converting between any pair takes a single glance.
BigInt precision
Arithmetic uses native BigInt, so there is no 32-bit or 53-bit ceiling. Values hundreds of digits long convert without rounding.
Paste straight from code
A leading 0b, 0o, or 0x prefix matching the chosen base is stripped automatically, and whitespace inside the number is ignored.
Signed values
A leading minus sign carries through to every base as a signed magnitude rather than a two's complement bit pattern.
Uppercase hex, clean errors
Hexadecimal output is uppercased for readability, and a digit invalid for the selected base shows an inline error instead of a wrong answer.
Nothing sent anywhere
Conversion is a few lines of JavaScript in your browser tab. No server, no logging, no account.
About this tool
This number base converter reads an integer in binary, octal, decimal, or hexadecimal and shows it in all four bases simultaneously. Instead of JavaScript's ordinary floating-point numbers, which lose precision beyond 53 bits, the conversion is built on BigInt, so every digit of an arbitrarily long integer is preserved exactly. Input is forgiving: 0b, 0o, and 0x prefixes are stripped, internal spaces are ignored, and a plus or minus sign is respected.
Base conversion comes up wherever raw values surface. Reading a hexadecimal memory address or an ARGB color from a debugger, translating file permission bits between octal and binary, decoding a subnet mask, or checking what a flag register's bit pattern means in decimal all reduce to the same operation. Because the four bases sit side by side with individual copy buttons, the page also works as a quick reference while writing bitwise code.
Everything runs in the page and the values you type are never transmitted to any server. If the number you are decoding is a Unicode code point, the unicode inspector will name the character behind it, and the long hex digests produced by the hash generator are exactly the kind of value this tool turns back into decimal.
Frequently asked questions
- How does the base converter work?
- Choose the base of the number you are entering (binary, octal, decimal, or hexadecimal), type the value, and the other three bases update live. Each result has its own copy button.
- Can it handle very large numbers?
- Yes. Conversions use native BigInt arithmetic, so there is no 32-bit or floating-point limit. You can convert numbers with hundreds of digits without losing precision.
- Does it accept prefixes like 0x or 0b?
- Yes. A leading 0x, 0o, or 0b prefix that matches the selected base is accepted and ignored, so you can paste values straight from code. Spaces inside the number are also ignored.
- Are negative numbers supported?
- Yes. A leading minus sign is preserved, and the result in every base keeps the sign. The converter works with signed integer magnitudes rather than two-complement bit patterns.
- Is anything uploaded to a server?
- No. All conversion happens in your browser. Nothing you type is sent anywhere or stored.
Related tools
Unicode Character Inspector
See the code point, category, and UTF-8 and UTF-16 bytes of every character.
Hash Generator
Hash text or any file to MD5, SHA-1, SHA-256, and SHA-512, and verify a checksum.
Angle Converter
Convert an angle between degrees, radians, gradians, turns, arcminutes and arcseconds, with a degrees-minutes-seconds breakdown.
Area Converter
Convert area between metric and imperial units instantly.
Binary to Decimal Converter
Convert a binary number to its decimal value, with hexadecimal and octal readouts.
Celsius to Fahrenheit Converter
Convert Celsius to Fahrenheit instantly, and edit either side to convert back.