Hex / Binary / Decimal Converter
Convert numbers instantly between decimal, hexadecimal, binary, and octal formats.
How to Use
- Select the input base (decimal, hex, binary, or octal).
- Type your number — all other bases update instantly.
- Click any result to copy it to your clipboard.
When to Use This
- Reading a hex value out of a memory dump or register description and seeing which individual bits a given bitmask actually sets.
- Translating a Unix permission such as 755 into the nine binary bits behind it while explaining chmod to someone new.
- Converting a color channel between the decimal value a design tool reports and the hex pair a stylesheet needs.
- Checking what an error code printed in decimal looks like in hex, which is often how the vendor's documentation lists it.
Frequently Asked Questions
About This Tool
Every base writes the same quantity with a different digit set and place value, and the pairings matter. One hex digit is exactly four bits and one octal digit exactly three, which is why a 32-bit register reads as eight hex characters and Unix file modes as three octal digits. Decimal has no such clean relationship with binary, which is why memory addresses, color channels and bitmasks are almost never written in it.
The four fields on this page stay linked. Each validates its input against a pattern first, so a stray 9 in the binary box is caught rather than quietly accepted, then converts through parseInt at the right radix and back with toString. Hex is emitted in uppercase. A minus sign is handled separately from the digits, so the other bases show a signed magnitude rather than a two's complement bit pattern. Double-clicking a field copies it.
Notes & Limits
- Values pass through JavaScript numbers, so anything above 9007199254740991 is rounded and a full 64-bit hash or register value will not round-trip.
- Only whole numbers are accepted. Fractional input such as 0.5 or 1.A is rejected by the field patterns rather than converted.
- Negative values are shown as a minus sign in front of the magnitude, not as two's complement, so -1 does not appear as FFFFFFFF.
- Conversion covers base 2, 8, 10 and 16 only. Base 32, base 36 and base64 are not among the four fields.