Number Base Converter: Binary, Decimal, Hex & Octal
Type in any field—binary, octal, decimal, or hex—and the rest update instantly.
100% client-side for privacy.
Release update v1.1
v1.1(June 7, 2026)
Added programmer mode with signed two's-complement interpretation for 8-bit, 16-bit, 32-bit, and 64-bit values.
Added batch conversion for multiple values with automatic prefix detection and CSV export.
Added quick reference conversions, step-by-step examples, visible FAQ content, and practical programmer use cases.
Number Inputs
Digits: 0–1. Spaces and 0b prefix allowed.
Digits: 0–7. 0o prefix allowed.
Digits: 0–9. You can include a minus sign.
Digits: 0–9, A–F. 0x prefix allowed.
Batch Convert Multiple Numbers
Paste one number per line. The converter will detect prefixes like 0b, 0o, and 0x; unprefixed values are treated as decimal.
Batch results will appear here.
Binary, Decimal, Hex, and Octal Conversion Table
Use this quick reference table for common computer values.
Decimal
Binary
Octal
Hexadecimal
Common meaning
0
0
0
0
Zero
1
1
1
1
One bit on
8
1000
10
8
One octal place
15
1111
17
F
One hex digit max
16
1 0000
20
10
Next hex place
255
1111 1111
377
FF
Max 8-bit unsigned
256
1 0000 0000
400
100
Start of 9-bit range
1024
100 0000 0000
2000
400
210
65535
1111 1111 1111 1111
177777
FFFF
Max 16-bit unsigned
Step-by-Step Examples
Example 1: Convert binary 101010 to decimal and hex
Binary 101010 equals
1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 0×1 = 42.
In hexadecimal, group the bits as 0010 1010, which becomes 2A.
Example 2: Convert hex FF to decimal, binary, and octal
Hex FF equals 15×16 + 15 = 255.
In binary, each hex digit maps to four bits: F = 1111, so
FF = 1111 1111. In octal, 255 is 377.
Example 3: Convert octal 755 to binary
Each octal digit maps to three binary bits:
7 = 111, 5 = 101, and 5 = 101.
So octal 755 becomes binary 111 101 101.
About This Base Converter
This tool converts integers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base
16). Enter a value in any box—including optional prefixes—and the others update automatically. Negative
numbers are supported. For very large values, we use JavaScript BigInt.
Toggle Show prefixes to display 0b/0o/0x in the
outputs.
Turn on Group binary to insert a space every 4 bits (nibbles) for easier reading.
Uppercase hex gives A–F; turn it off for lowercase.
Programmer mode interprets binary, octal, and hex inputs as signed two's-complement
values at 8, 16, 32, or 64 bits.
Signed vs Unsigned Binary
Unsigned binary represents only zero and positive values. Signed binary usually uses
two's complement, where the leftmost bit indicates whether the value is negative.
For example, in 8-bit two's complement, 11111111 represents -1,
while unsigned 11111111 represents 255.
Learn About Binary, Octal, Decimal, and Hexadecimal
This base converter helps you translate numbers between binary (base 2),
octal (base 8), decimal (base 10), and
hexadecimal (base 16). Whether you’re a student reviewing number systems,
a developer reading bitmasks, or a hardware enthusiast examining registers, this
binary to hex converter and octal to decimal tool gives instant,
accurate results—right in your browser.
Why Different Bases Exist
Computers store information in binary, where each digit (bit) is 0 or 1.
Engineers often group bits into nibbles (4 bits) or bytes (8 bits) to make them
easier to read. That’s why hex (0–9 and A–F) is so popular:
each hex digit maps exactly to 4 binary digits. Octal (0–7) is also
compact—each octal digit maps to 3 binary digits—so you’ll see it in Unix permissions and
some legacy documentation. Decimal is the human default for everyday math.
Quick Mental Rules
Binary → Hex: Split the binary string into groups of four, then translate each group to a
hex digit. Example: 1111 0001 → F1.
Binary → Octal: Group by threes. Example: 111 001 → 71.
Hex → Binary: Replace each hex digit with its 4-bit equivalent. Example:
0x2A → 0010 1010.
Powers of Two: 210 = 1024, 216 = 65,536, 232 ≈ 4.29
billion—handy for estimating sizes.
How to Use This Converter
Type a value into any input—binary, octal, decimal, or hex—and the others update
instantly. You can include common prefixes (0b, 0o, 0x),
toggle uppercase hex, and group binary in 4-bit blocks for readability.
Negative integers are supported, and the tool uses BigInt to handle very large values.
Common Pitfalls to Avoid
Digit mix-ups: Hex allows A–F; octal does not allow 8 or 9.
Leading zeros: They do not change the value, but can be useful for alignment.
Sign placement: Put the minus sign before the prefix (e.g., -0xFF).
Where Base Conversions Show Up
You’ll encounter base conversions when reading microcontroller datasheets, configuring
GPIO bitmasks, parsing color codes (e.g., #FF6600 is hex), analyzing file
headers, or interpreting network packets. System administrators also meet octal in
POSIX file permissions (e.g., 0755).
Privacy and Accessibility
Your inputs never leave your device—this converter runs entirely client-side for privacy.
It supports keyboard navigation, copy buttons for quick sharing, and optional formatting
to make long binary strings easier to read.
Try quick checks like binary to decimal, decimal to hex,
or octal to binary using the examples above, and use the options bar to
match your preferred display style.
Frequently Asked Questions
What is a number base converter?
A number base converter translates the same value between numeral systems such as binary, decimal, octal, and hexadecimal.
Does this converter support negative numbers?
Yes. You can enter a minus sign before the value, including prefixed values like -0xFF.
What is the difference between signed and unsigned binary?
Unsigned binary represents only zero and positive numbers. Signed binary uses a convention such as two's complement to represent negative numbers within a fixed bit width.
Why does hexadecimal map so cleanly to binary?
One hexadecimal digit represents exactly four binary bits. For example, F equals 1111.
Why is octal used for file permissions?
Each octal digit maps to three binary bits, which matches the read, write, and execute permission flags used in Unix-style permissions.
Common Uses for Binary, Hex, Octal, and Decimal
1
RGB colors
Web colors use hexadecimal byte values. In #FF6600, FF is red, 66 is green, and 00 is blue.
Color codes
2
Unix permissions
Permission values like 755 are octal. Each digit maps to three binary flags for read, write, and execute access.
File modes
3
Memory addresses
Debuggers, disassemblers, and logs often show addresses in hex, such as 0x7FFF0000, because hex is compact and aligns with binary.
Low-level debug
4
Bitmasks and flags
Binary values like 0b10110101 make it easier to see which individual flags are on or off in a register or option mask.
Registers
5
Network packets and IP addresses
Network tools often expose bytes in binary or hex. For example, 127.0.0.1 corresponds to the 32-bit hex value 0x7F000001.