Hex to Decimal
Converter
Convert between hexadecimal, decimal, binary, and octal. Supports color hex codes with RGB breakdown.
How It Works
Enter a Value
Type a hex or decimal number in either input field.
See All Bases
Instantly view the value in hex, decimal, binary, and octal.
Copy & Use
Copy any representation to your clipboard with one click.
Convert hex to decimal online and see the value in hexadecimal, decimal, binary, and octal in a single view. ConverterUp's number base converter is a quick reference for embedded developers, low-level programmers, and students working through assembly or networking exercises. Type a hex or decimal value and every base updates instantly; six-digit color codes like #FF5733 also show a color preview with the matching RGB values. Calculations run in your browser, so values never leave your machine.
Where base conversion shows up day-to-day
Debugging is the most common case. Stack traces show memory addresses in hex (0x7ffee5b3c000), registers in hex, flags as bitmasks. Translating to decimal helps spot patterns: a register holding 0x10000000 is bit 28 set, which often matches a flag definition in the source.
Networking and protocols use hex constantly: MAC addresses (00:1A:2B:3C:4D:5E), IPv6 (2001:db8::1), protocol numbers, port flags, MTU sizes, TCP flag bits. Wireshark dumps and packet captures are essentially walls of hex; conversion is required to interpret them.
CSS and design live in hex (#2DD4BF), occasionally in decimal-RGB (rgb(45, 212, 191)). A designer handing off a color and a developer reading the same color use different bases for the same value; conversion is part of the handoff.
Embedded and assembly work touches every base: hex for opcodes and memory, binary for bit manipulation, octal for legacy Unix permissions (chmod 755 is rwxr-xr-x = 111101101 binary = 0o755 octal). Mixing the bases without fluency is a recipe for off-by-one bugs.
Two's complement and signed integers
Modern CPUs represent signed integers using two's complement. To negate a number, flip every bit and add 1. In 8-bit, the value 0xFF is 255 unsigned but -1 signed; 0x80 is 128 unsigned but -128 signed. This is why an 8-bit signed integer ranges from -128 to +127 (not -127 to +127): the negative range has one more value.
When converting hex to decimal, you must know the bit width and signedness of the source. 0xFFFFFFFF is 4 294 967 295 as a 32-bit unsigned int, but -1 as a 32-bit signed int. ConverterUp shows the unsigned value, which matches how most hex literals are written in C and Go; to read a value as signed, subtract 2^N when the top bit is set (for 32 bits: value − 4 294 967 296).
The sign bit is always the most significant bit. In hex, that means the high nibble: a 32-bit hex value starting with 0x8… through 0xF… is negative when interpreted as signed. 0x7FFFFFFF is the maximum 32-bit signed int (2 147 483 647); add 1 and you wrap to 0x80000000, which is the minimum (-2 147 483 648).
When debugging integer overflow, look at the binary output to see the exact bit pattern. Overflow in two's complement is silent — the CPU does not raise an exception, the bits just wrap. A web form accepting a number into a 32-bit signed field will accept 2 billion and store 2 billion as expected; it will silently corrupt anything above ~2.1 billion.
Floats and color hex codes
Floating-point numbers in memory are not a simple base conversion of the decimal value. IEEE-754 single precision (32-bit float) splits 1 sign bit, 8 exponent bits, and 23 mantissa bits. 1.0 in IEEE-754 is 0x3F800000; 0.1 is 0x3DCCCCCD — the famously inexact representation that causes 0.1 + 0.2 !== 0.3 in JavaScript.
ConverterUp converts whole numbers; it does not decode IEEE-754 floats. If you have a hex dump of a float (for example 0x3F800000), use a dedicated float inspector or a line of code such as new DataView(buffer).getFloat32(0) to read it.
Color hex codes are a different and simpler beast: 3 bytes (RGB) or 4 bytes (RGBA), each in 00-FF. #2DD4BF means R=45, G=212, B=191. The 8-digit form (#2DD4BFCC) appends alpha. Modern CSS also supports the relative-color notation, but hex remains the most compact and most universally supported.
Frequently asked questions
Does the converter handle negative numbers?
No — it converts non-negative integers. For a negative number in two's complement, convert the unsigned hex value and subtract 2^N (256 for 8 bits, 65 536 for 16, 4 294 967 296 for 32) when the top bit is set.
What is the maximum value supported?
Values are exact up to 2^53 − 1 (9 007 199 254 740 991, or 0x1FFFFFFFFFFFFF), the largest integer JavaScript represents safely. Beyond that the last digits may be rounded.
Can I convert color codes?
Yes. Enter a six-digit hex color like #2E5C55 and the tool shows a color preview with the matching red, green and blue values (46, 92, 85), which you can copy as RGB.
Can I convert decimal to hex?
Yes. Type in the Decimal field instead of the Hexadecimal one and the hex, binary and octal values update instantly. Each result has its own copy button.
Does the tool accept the <code>0x</code> prefix or <code>0b</code> notation?
Hex input accepts 0x, #, or no prefix, in upper or lower case. Binary and octal are shown as results with their own copy buttons; the input fields are hexadecimal and decimal.
Can I convert binary or octal numbers?
The results show binary and octal for any value you enter. To convert from binary or octal, use the dedicated conversion pages (binary to decimal, octal to decimal and others) linked below.