Online Base Converter: HEX, DEC, OCT, BIN
A programmer number-base converter that instantly translates an integer between hexadecimal (HEX), decimal (DEC), octal (OCT) and binary (BIN). Choose the input base, type with the base-aware on-screen keypad, and see all four results at once; copy any value or paste a number from your clipboard, with everything processed locally in your browser.
Base Converter Guide
Convert instantly between HEX, DEC, OCT and BIN
The base converter converts a number among binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) as you type. Choose the input base, type a value using the on-screen keypad (which only enables digits valid for that base), and the other three rows update instantly with the equivalent values.
01 Converting a number
Select the base you want to type in (HEX, DEC, OCT or BIN), then enter the number. The keypad adapts: in HEX mode the letters A–F are available; in OCT only 0–7 are active; in BIN only 0 and 1. As you type, the DEC, HEX, OCT and BIN read-only rows all show the converted value. Switching the input base keeps the numeric value and lets you continue editing in the new base.
Use ⌫ to remove the last digit and AC to reset to zero. Values can be large; the converter uses integer arithmetic and shows the exact representation in each base.
Display & clipboard
- Copy (display)Copies the entered number (in the input base) to the clipboard.
- Paste (display)Pastes a number from the clipboard; characters invalid for the selected base are stripped and leading zeros removed. Also available via Ctrl/Cmd+V.
- Copy (per row)Each output row (HEX/DEC/OCT/BIN) has its own copy icon for copying that representation directly.
Input base selector
- HEXSet input to hexadecimal (base 16); enables A–F keys.
- DECSet input to decimal (base 10); digits 0–9.
- OCTSet input to octal (base 8); digits 0–7.
- BINSet input to binary (base 2); only 0 and 1.
Keypad
- 0–9Numeric digits; those invalid for the selected base are disabled.
- A–FHexadecimal letters, shown only in HEX mode (values 10–15).
- ⌫Delete the last entered digit.
- ACClear the value back to zero.
Output rows
- HEXEquivalent value in base 16.
- DECEquivalent value in base 10.
- OCTEquivalent value in base 8.
- BINEquivalent value in base 2.
- The keypad greys out digits that are invalid for the current base, preventing illegal input.
- Switch the base selector while a value is shown to reinterpret/edit it in another base.
- For bitwise logic or two’s-complement work, the exact binary representation shown here is authoritative.
A free online number-base converter that translates between hexadecimal (HEX), decimal (DEC), octal (OCT) and binary (BIN) in real time. Choose the input base, type with the on-screen or physical keyboard, and all four representations update instantly. Everything runs locally in your browser — no sign-up, no data leaves your device.
Converting a number
Pick the base you are typing from — HEX (16), DEC (10), OCT (8) or BIN (2). Enter the value using the available keys; the other three readouts update live. The A–F keys appear automatically in hexadecimal mode, and keys that are invalid for the chosen base are disabled.
Common use cases
Programmers use it for color codes, bit masks and memory addresses; networking and systems engineers for MAC/IP address work and permission bits; students of digital logic for quick conversions between bases. Large integers are handled precisely up to the safe-integer limit.
Privacy
All conversion happens locally in JavaScript. The number you type never touches a server and is not written to history, so it is safe for quick look-ups of sensitive values.
FAQ
QWhich bases are supported?
Hexadecimal (base 16), decimal (base 10), octal (base 8) and binary (base 2) — all four update at once as you type.
QCan I type hexadecimal letters?
Yes — A through F appear on the keypad in HEX mode and are also accepted from a physical keyboard.
QWhy are some keys disabled?
Keys that are invalid for the current input base (for example 8 and 9 in octal or binary) are disabled to prevent invalid digits.
QAre the values I type saved?
No. The converter runs entirely in your browser and nothing is uploaded or stored in history.