🔢 Hex Base Converter – Convert Hex, Decimal, Binary & Octal
The Hex Base Converter is a developer-focused tool for translating numeric values between hexadecimal (base-16), decimal (base-10), binary (base-2), and octal (base-8) — plus any custom base from 2 to 36. Whether you are reading memory dumps, decoding color codes, working with bitmasks, or debugging hardware registers, this tool provides instant, precise conversions using BigInt arithmetic with no overflow risk.
⚙️ How to Use This Tool
Simply type a value into any of the four base input fields. The remaining fields update in real time as you type. All fields are editable — you can start from hex, decimal, binary, or octal and get all other representations instantly. Use the Custom Base field to convert to any positional notation system from base-2 to base-36.
- Enter a number in any base field (Hex, Decimal, Binary, or Octal).
- Optionally select a Bit Width (8, 16, 32, 64) to pad binary output and enable signed mode.
- Enable Signed to use two's-complement interpretation for negative values.
- Use the Copy buttons to grab any result directly to your clipboard.
🎨 Hexadecimal in Everyday Computing
Hexadecimal is the lingua franca of low-level computing. Here are the most common use cases where hex fluency matters:
- Color codes: Web colors are expressed as 3- or 6-digit hex values —
#FF8000encodes red=255, green=128, blue=0. This tool shows a live color swatch when you enter a valid color hex. - Memory addresses: Debug logs, core dumps, and CPU registers all display addresses in hex — e.g.,
0x7FFD2Afor a stack pointer. - Bitmasks & flags: Permissions, status registers, and protocol fields are often expressed as hex bitmasks. Converting to binary reveals which bits are set.
- Unicode code points: Characters are identified by code points like
U+1F600— the hex value1F600converts to decimal128512. - File offsets & hex dumps: Hex editors display file byte offsets and raw bytes in hexadecimal — each pair of hex digits represents one byte (0x00–0xFF).
📐 The Hex ↔ Binary Relationship
One of the most useful properties of hexadecimal is its direct 1:4 mapping to binary. Because 16 = 24, each hex digit corresponds to exactly 4 binary bits (a nibble):
Hex | Binary
-----|--------
0 | 0000
4 | 0100
A | 1010
F | 1111
FF | 1111 1111 (= 255 decimal)
1A3F | 0001 1010 0011 1111This means you can convert between hex and binary mentally, one digit at a time — a powerful skill when reading CPU flags or network packet headers.
🔐 Signed vs Unsigned Integers
When working with fixed-width integers (8, 16, 32, or 64 bits), the same bit pattern can represent different values depending on whether it is treated as signed (two's complement) or unsigned:
0xFFunsigned 8-bit = 2550xFFsigned 8-bit = −1 (two's complement)0x8000signed 16-bit = −32768 (minimum int16)
Toggle the Signed switch after selecting a bit width to see how the interpretation changes. This is essential when debugging C/C++ integer types, Rust primitives, or assembly code.
🔢 Common Base Reference
Beyond the standard four bases, the custom base field supports any radix from 2 to 36. Here are some bases with practical applications:
- Base-36: Uses 0–9 and A–Z; produces compact alphanumeric IDs.
- Base-32: Widely used in encoded tokens (TOTP secret keys, Base32 encoding).
- Base-12 (duodecimal): Naturally divides by 2, 3, 4, and 6 — used in some measurement systems.
- Base-60 (sexagesimal): The foundation of time (60 seconds, 60 minutes) and angular measurement (degrees).
💡 Tips for Developers
- Enable Group Bits to display binary values in 4-bit nibble groups for easier reading — e.g.,
1111 0000instead of11110000. - Enable Show Prefix to display
0xbefore hex,0bbefore binary, and0obefore octal — matching C, Python, and JavaScript literal notation. - Use the Copy button next to any output to grab the value directly for pasting into code or documentation.
- For hex color work, enter 3-digit shorthand (e.g.,
F80) or 6-digit full codes (e.g.,FF8000) to see the color preview swatch.