Base Converter
Convert numbers between any bases from 2 to 36. Instantly see binary, octal, decimal, and hexadecimal simultaneously. Includes ASCII conversion, 2's complement, and zero-padded binary output.
Converted Value
—
Extended More scenarios, charts & detailed breakdown ▾
Result
—
Professional Full parameters & maximum detail ▾
Base Representations
Decimal —
Hexadecimal —
Octal —
Binary
Binary —
Zero-padded Binary —
How to Use This Calculator
- Enter your number in the text field using digits valid for the selected base.
- Choose From Base (e.g. Decimal) and To Base (e.g. Hexadecimal).
- See the converted result instantly.
- Use Common Bases tab to see the value in all four common bases at once.
- Use ASCII tab to convert decimal/hex codes to characters.
- The Professional tab adds 2's complement, zero-padded binary, and signed integer support.
Formula
To convert from base B to decimal: multiply each digit by B raised to its position power. To convert decimal to base B: divide repeatedly by B and collect remainders.
Hex: each digit = 4 bits. Octal: each digit = 3 bits.
Example
Convert 255 (decimal) to hex: 255 = 16×15 + 15 = FF. To binary: 255 = 11111111. To octal: 255 = 377.
Frequently Asked Questions
- Repeatedly divide by 2 and collect remainders. For 13: 13÷2=6r1, 6÷2=3r0, 3÷2=1r1, 1÷2=0r1 → read remainders bottom-up = 1101. Or just enter 13 with From: Decimal, To: Binary.
- Hexadecimal (base 16) uses digits 0–9 and A–F. It is compact: one hex digit represents exactly 4 binary bits, so 2 hex digits = 1 byte. Used extensively in programming, colors (e.g. #FF5500), and memory addresses.
- 2's complement is the standard way to represent negative integers in binary. To negate a number: invert all bits, then add 1. For 8-bit: -1 = 11111111, -128 = 10000000, 127 = 01111111.
- This converter supports any base from 2 (binary) to 36. Bases above 10 use letters A–Z as digits. Base 36 uses all alphanumeric characters (0-9, A-Z).
- Each pair of hex digits represents one byte (ASCII character). FF = 255, 41 = 'A', 61 = 'a', 20 = space. Use the ASCII tab to convert individual character codes.