Number Base Converter
Convert integers between binary, octal, decimal and hex.
Your numbers are converted locally in your browser and nothing is uploaded to a server.
Working with file permissions? Try the Chmod Calculator.
About Number Base Converter
This online number base converter switches any integer between binary, octal, decimal, and hexadecimal in a single view, showing all four representations side by side. Type a value and pick an input base, or leave it on Auto to detect 0x, 0b, and 0o prefixes automatically. It handles very large numbers without precision loss thanks to BigInt, so it works for binary to decimal lookups, hex to decimal math, decimal to binary masks, and general radix conversions. Developers debugging bitmasks, memory addresses, color values, or Unix permission flags can read the DEC, HEX, OCT, and BIN rows together instead of converting one base at a time. Negative integers and underscore digit grouping (like 1_000) are accepted too. Everything is processed locally in your browser, so your data never leaves your device and there is no tracking.
Features
- Converts integers between binary, octal, decimal, and hexadecimal at once
- Shows DEC, HEX, OCT, and BIN results together in one panel
- Auto mode detects 0x (hex), 0b (binary), and 0o (octal) prefixes
- Handles arbitrarily large integers with BigInt and no precision loss
- Manual input base selector for Bin, Oct, Dec, or Hex
- Accepts negative integers and underscore digit separators like 1_000
- Clear inline error when a value is not valid for the chosen base
- Runs entirely in your browser with no tracking
How to use the Number Base Converter
- Type or paste an integer into the Value field.
- Choose the input base with the Bin, Oct, Dec, or Hex selector, or leave it on Auto.
- Read the converted DEC, HEX, OCT, and BIN values shown below.
- Copy the representation you need directly from the result rows.
Example
Input
0xff
Output
DEC: 255
HEX: ff
OCT: 377
BIN: 11111111
Auto mode detects the 0x prefix and converts to every base.
Common errors & troubleshooting
- You see "Not a valid base-N number" after typing digits. — The digits do not fit the selected input base (for example 9 in binary or g in hex). Switch to Auto or pick the correct base.
- A 0x or 0b prefix is treated as invalid. — Prefix detection only works in Auto mode. Switch the input base to Auto, or remove the prefix when forcing a specific base.
- You expected a decimal or fractional result. — This converter handles integers only. Remove any decimal point or fraction before converting.
- A hex value pasted without 0x is read as decimal. — In Auto mode, unprefixed input defaults to decimal. Add a 0x prefix or set the input base to Hex.
Frequently asked questions
- What is the number base converter?
- It is an in-browser tool that converts an integer between binary, octal, decimal, and hexadecimal at the same time, showing DEC, HEX, OCT, and BIN side by side.
- How do I convert hex to decimal or binary to decimal here?
- Type the value (or paste 0xff or 0b1010), leave the base on Auto or select Hex/Bin, and read the DEC row in the results for the decimal equivalent.
- Can the number base converter handle very large numbers?
- Yes. It uses BigInt internally, so arbitrary-size integers convert with no precision loss, even far beyond 64-bit values.
- Does it detect prefixes like 0x, 0b, and 0o?
- Yes, in Auto mode it recognizes 0x as hex, 0b as binary, and 0o as octal. You can also force a specific input base from the selector.
- Why is my value rejected as invalid?
- The input contains a digit not allowed in the selected base, such as a 2 in binary or a z in hex. Pick the right base or use Auto.
- Does the number base converter send my input anywhere?
- No. The number base converter runs entirely in your browser, so your numbers never leave your device and nothing is uploaded to a server.
Related tools
All ArrayKit tools