Hex Converter

Hex Converter

Hexadecimal ⇄ decimal · binary · octal · text

Decimal value

How to Use

  1. 1Pick what you are converting from: hex, decimal, binary, octal or text.
  2. 2Type the value. The 0x prefix and upper/lower case are both fine.
  3. 3Every other base updates live as you type.
  4. 4Check the steps box for the digit-by-digit working.

Hex Basics

  • Digits0 to 9 then A=10 … F=15
  • Place valuesdigit n is worth 16ⁿ
  • Hex → decimalmultiply & add: 1F4 = 256+240+4
  • Hex → binaryeach digit = 4 bits

Quick Examples

Tap an example to load it above.

Guide

Everything about the Hex Converter

How base 16 works and why programmers use it everywhere.

Hexadecimal (hex) is the base-16 number system: after 9 it keeps counting with the letters A to F, so a single digit can hold 16 values. This hex converter translates hex to decimal, binary, octal and text, and back again, instantly, with the full working shown.

Hex exists because it maps perfectly onto binary: one hex digit is exactly four bits. A byte (8 bits) is always two hex digits, which is why colors (#FF6C00), memory addresses (0x7FFF) and hash values are written in hex.

Remember: A=10, B=11, C=12, D=13, E=14, F=15. So FF = 15×16 + 15 = 255, the biggest value one byte can hold.

Hex to decimal

Multiply each digit by its power of 16 and add. 1F4 = 1×256 + 15×16 + 4×1 = 500. The rightmost digit is 16⁰ = 1, then 16¹ = 16, 16² = 256 and so on.

Decimal to hex

Divide by 16 repeatedly and collect remainders from bottom to top: 500 ÷ 16 = 31 r 4, 31 ÷ 16 = 1 r 15 (F), 1 ÷ 16 = 0 r 1 → 1F4.

Where hex shows up

  1. 1Web colors

    #RRGGBB is three bytes in hex, so #FFFFFF is white (255, 255, 255) and #000000 is black.

  2. 2Memory & debugging

    Pointers, offsets and dumps are printed in hex because each byte is exactly two digits.

  3. 3Hashes & IDs

    MD5/SHA checksums, UUIDs and MAC addresses are all hex strings.

  4. 4Character codes

    Unicode code points are written U+0048, which is hex for 72, the letter "H". Text mode converts whole strings.

FAQ

Frequently Asked Questions

How do I convert hex to decimal?

Multiply each digit by its power of 16 and add. Letters count as A=10 through F=15. Example: 2A = 2×16 + 10 = 42. The steps box on this page prints that expansion for any number you enter.

How do I convert decimal to hex?

Divide by 16 repeatedly and keep the remainders. Remainders of 10 to 15 become A to F. Read them bottom to top: 255 → 255÷16=15 r15, 15÷16=0 r15 → FF.

How do I convert hex to binary?

Replace each hex digit with its 4-bit binary code: 1→0001, F→1111, 4→0100. So 1F4 = 0001 1111 0100. No arithmetic needed, and that direct mapping is the main reason hex is used at all.

What does the 0x prefix mean?

It simply marks a number as hexadecimal so 10 (ten) is not confused with 0x10 (sixteen). This converter accepts values with or without the 0x prefix, in upper or lower case.

What is FF in decimal?

FF = 15×16 + 15 = 255, the maximum value of one byte. Related values: 7F = 127, 80 = 128, 100 = 256. You will meet these constantly in programming and networking.

Is this hex converter free and does it work on mobile?

Yes. It is 100% free with no sign-up. It runs entirely in your browser on any device, uses exact big-integer math so huge values stay precise, and nothing you type is stored or sent anywhere.