Radix Converter
Convert between binary, octal, decimal and hex; supports negatives and big integers.
15Hex: 0xF · Binary: 1111
How to use
Purpose
Online radix converter supporting binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and any base from 2 to 36. Also shows ASCII characters, Unicode code points, and one's/two's complement representations. Common in low-level programming debug (bit ops, memory dumps), network protocol analysis (MAC/IP in hex), color values (HEX RGB), CTF security competitions, and teaching examples. All conversion runs locally.
Steps
- Type a number on the left, pick the source base (default decimal)
- Right pane shows binary, octal, decimal, hexadecimal simultaneously
- Custom base: any base from 2 to 36 (base 36 uses 0-9 + a-z)
- Endianness toggle: big-endian / little-endian (affects multi-byte hex display)
- Sign representation: original, one's complement, two's complement (for negative numbers)
- Hex extras: corresponding ASCII char (0x41 = "A"), Unicode code point
- Batch: one number per line
- IP/MAC specialized mode: 192.168.1.1 ↔ 0xC0A80101
FAQ
- Why is 0xFF -1 in two's complement instead of 255?
- Depends on bit width. 8-bit unsigned: 0xFF = 255. 8-bit signed (two's complement): top bit 1 means negative, two's complement gives -1 = 11111111 = 0xFF. 16-bit unsigned: 0x00FF = 255 (top bit 0 = positive). Always specify bit width and signed/unsigned. The tool defaults to literal value; toggle signed/unsigned display.
- Do I need the 0x prefix for hex?
- Depends on language. C/C++/Java/Python/JS: 0x prefix (0xFF). Pascal: $ prefix ($FF). Assembly: h suffix (0FFh). The tool recognizes all formats; output can include or omit prefix.
- How are negative numbers in binary represented?
- Three representations. Original: top bit is sign + absolute binary (-5 = 10000101). One's complement: invert all bits except sign (-5 = 11111010). Two's complement: one's complement + 1 (-5 = 11111011). Computers always use two's complement internally (unifies add/subtract logic). The tool shows all three for learning.
- How do I convert an IP address to hex?
- An IP is 4 decimal bytes, each → 2 hex chars, concatenated. 192.168.1.1 → 192=0xC0, 168=0xA8, 1=0x01, 1=0x01 → 0xC0A80101. The IP mode handles this. Common for network protocol debug, firewall rules (iptables accepts hex IPs).
- Why are colors in hex like #FFFFFF?
- Colors use RGB three channels, each 0-255 (8 bits = 2 hex digits). Total 6 hex characters (#FFFFFF) is more compact than decimal (255,255,255). Short form #FFF repeats each digit (#FFF = #FFFFFF, #ABC = #AABBCC).
Use cases
- Bitwise debug: & | ^ ~ << >> intermediate results in binary
- Memory dump analysis: reverse data structures from hex dumps
- Network protocols: parse IP/MAC/port in hex
- Color conversion: see RGB components of #FFAA00
- CTF security competitions: radix tricks
Use cases
Bitwise debug, memory dump analysis, network protocol parsing, color values, CTF competitions, teaching. Developers, security researchers, network engineers. Multi-base simultaneous display, complement representations, IP specialized mode, endianness toggle are the differentiators.