How it works
Convert between Hexadecimal, Decimal, and Binary values instantly.
Input query strings and outputs
Use an input name in this page’s URL as ?name=value, and join additional inputs with &. Portable shared links may instead use the compact ?ac= state parameter.
Input query strings
3-
?hex=HexText · Optional · Default: 1A
-
?decimal=DecimalNumber · Optional · Default: 26
-
?binary=BinaryText · Optional · Default: 11010
Outputs
1-
resultResultText · Primary output
result contains the calculator’s complete rendered result area, including its visible result cards, tables, charts, and messages.
Convert between Hex, Decimal, and Binary bases
Description
The Hex Calculator is a multi-base conversion tool designed for programmers, engineers, and computer science students. It allows you to input a value in Hexadecimal (used for colors and memory addresses), Decimal (standard math), or Binary (machine code), and instantly see the equivalent values in the other two bases.
Inputs
- Hexadecimal: Supports digits 0-9 and letters A-F (e.g.,
1A,FF). - Decimal: Standard base-10 integers (e.g.,
255). - Binary: Supports digits 0 and 1 (e.g.,
11010). Note: Editing any field will automatically update the others.
Outputs
- Result Cards: Displays the synchronized values for Hex, Decimal, and Binary.
Chart
- N/A: This tool provides direct base-conversion results.
“Good to Know”
- Hex in Web Design: Hexadecimal is most commonly seen in CSS as “hex codes” for colors (e.g.,
#FFFFFFfor white). - Nibbles and Bytes: One hex digit (0-F) represents exactly 4 bits (a nibble). Two hex digits represent 8 bits, which is a full Byte.
- Base-16 Advantage: Hex is used in computing because it is a much more compact way to read binary code.
FFis easier for a human to read than11111111.
Examples
Example 1: Max Byte Value
- Input: Decimal: 255
- Output:
- Hex: FF
- Binary: 11111111
Example 2: Binary to Hex
- Input: Binary: 1010
- Output:
- Hex: A
- Decimal: 10
Example 3: Standard Memory Offset
- Input: Hex: 400
- Output:
- Decimal: 1024
- Binary: 10000000000