Advertisement728 × 90 — Leaderboard
Advertisement320 × 50 — Mobile banner

Hex to Binary Converter

Convert between decimal, binary, octal, and hexadecimal instantly
Also need:Unix Timestamp ConverterUUID GeneratorSHA-256 Hash Generator
Enter a number in any base — all others update instantly
Quick reference — decimal 0–15
DecBinOctHex
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

Frequently Asked Questions

What is a number base converter?
A number base converter translates a number between different positional notation systems — decimal (base 10), binary (base 2), hexadecimal (base 16), and octal (base 8). Type a value in any field and all other representations update instantly.
How do I convert binary, octal, or hexadecimal to decimal by hand?
Multiply each digit by its base raised to the position power: binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. Octal 17 = 1×8 + 7 = 15. Hex 1F = 1×16 + 15 = 31. This positional-value method works for any base. In code: parseInt("1F", 16) in JavaScript, int("1F", 16) in Python.
What is hexadecimal used for in programming?
Hex is used where compact representation of binary data matters: memory addresses (0x7FFE0000), color codes (#FF5733), byte values (0xFF), bitmasking (flags & 0x0F), and binary file formats. Each hex digit represents exactly 4 bits, making it far more compact than binary and more precise than decimal for bit-level work.
How do I convert between bases in Python, JavaScript, or Java?
Python: bin(42), oct(42), hex(42) → binary/octal/hex string; int("2a", 16) converts hex to int. JavaScript: (42).toString(2/8/16); parseInt("101010", 2). Java: Integer.toBinaryString(42), Integer.toHexString(42), Integer.parseInt("2a", 16). This online tool handles any base from 2 to 36.
Why do computers use binary internally?
Electronic circuits have two reliable states: on (1) and off (0). Binary maps directly to these states — one bit per transistor. Other bases (decimal, octal, hex) are only used by humans to read and write values; the hardware always operates in base-2. Hexadecimal is popular precisely because each hex digit is exactly 4 bits — a clean mapping to hardware.
Advertisement300 × 250
Advertisement300 × 250
Advertisement728 × 90

About Hex to Binary Converter

Type a number in any base and see it converted to all others in real time. Supports decimal (base 10), binary (base 2), octal (base 8), and hexadecimal (base 16). Uses BigInt internally so there is no upper limit on number size. Works entirely in your browser — no server required.

Advertisement300 × 250
Ad
AdvertisementSticky banner
Ad
AdvertisementSticky banner