Conversor hexadecimal
Resultado
Valor en cada base

Convertidor Hexadecimal

Convert a hex number to decimal, binary and octal and back; when the length is even it shows the byte count, and the right lists every base 2-36.

Accepts 0x prefixes and upper/lower case, with big-integer math for exact conversion of long hex strings. For text-to-hex byte encoding use the Encode tool.

Features

How to use

  1. Enter a hex number on the left (e.g. FF, 0xFF, 1A2B, deadbeef).
  2. The right side instantly shows decimal, binary, octal and byte count.
  3. The "every base" panel lists bases 2-36.

FAQ

How is this different from Hex in the Encode tool?

Here hex is treated as a number for base conversion; the Encode tool turns text into hex byte strings - different purposes.

Why are upper and lower case both fine?

Hex digits a-f are case-insensitive, so the tool accepts either.

Does this page collect my data?

No. The content is either baked into the HTML at build time or every calculation runs locally in your browser, so your input is never sent to any server. Apart from the footer traffic counters (Baidu Analytics and our self-hosted visitor counter, see the privacy policy), this site collects nothing about your visit.

How do I convert hex to RGB?

Split #A1B2C3 into pairs and read each pair as a decimal byte: A1 is 161, B2 is 178 and C3 is 195, so the colour is rgb(161, 178, 195). Three-digit shorthand like #ABC expands to #AABBCC before the same conversion.

What does the 0x prefix mean?

It marks a hexadecimal literal in C, JavaScript, Python and most other languages: 0x1F is 31 and 0xFF is 255. The prefix exists so the compiler does not confuse 0x10 (sixteen) with the decimal number 10.

Why is hex used for colours and memory addresses?

Because one byte is exactly two hex digits, addresses and colour channels line up on clean boundaries - 0xFF0000 is a full red channel with nothing in the other two. Decimal would need three digits per byte and leave the alignment unreadable.

How do I read a negative hex value?

As two's complement: within a 32-bit field 0xFFFFFFFF is -1 and 0xFFFFFFFE is -2, because the top bit carries the sign. Whether a value is negative therefore depends on the declared width, not on the digits alone.

Related tools & reading

Comentarios

Este sitio es solo frontal: sin backend ni cuentas. Los comentarios van a GitHub Issues, Discussions o correo.

Pega esto en el issue o correo para ayudarme a localizar el problema; no incluye nada de lo que escribiste

También:Ver comentarios existentes · Comentarios por correo (sin cuenta de GitHub):278975598@qq.com