Number Base Converter

Convert integers between Decimal, Hexadecimal, Octal, and Binary number systems instantly. Supports arbitrarily large integers via BigInt.

Input

FAQ

What is hexadecimal used for?

Hexadecimal (base 16) is widely used in programming for memory addresses, color codes (#FF6347), byte values, and binary data representation because it compactly represents 4 bits per digit.

Does this support negative numbers?

Currently this tool converts unsigned positive integers. Negative number representation (two's complement) varies by bit width and is outside this tool's scope.

How large a number can it convert?

The converter uses JavaScript BigInt, so it can handle arbitrarily large integers without precision loss.

Frequently Asked Questions

What is hexadecimal?

Hexadecimal (base 16) uses digits 0–9 and letters A–F. It is widely used in programming for memory addresses, CSS colors, and byte values because it compactly represents binary data (1 hex digit = 4 bits).

What is binary?

Binary (base 2) uses only 0 and 1, representing the off/on states of transistors. It is the fundamental number system of all digital computers.

What is octal?

Octal (base 8) uses digits 0–7. It was historically used in Unix file permissions (e.g., chmod 755) and some programming contexts where 3-bit groupings are convenient.

How Positional Number Systems Work

In any positional number system, each digit has a valuedetermined by the digit itself and its position (its power of the base). In decimal (base 10), the number 345 means $3 \times 10^2 + 4 \times 10^1 + 5 \times 10^0 = 345$. The same principle applies to every other base: the only thing that changes is what number is raised to the power.

The Four Most Common Bases

BaseDigitsPrefix (code)Primary use
Binary (2)0, 10b (JS/Py/C)CPU instructions, bitwise ops, network masks
Octal (8)0 – 70o (JS/Py)Unix file permissions (chmod 755)
Decimal (10)0 – 9(none)Human-readable quantities, most business logic
Hexadecimal (16)0 – 9, A – F0x (JS/C/Py)Memory addresses, CSS colors, byte values, hashes

Hexadecimal in Practice

  • CSS colors#FF5733 = R:255, G:87, B:51.
  • Memory addresses0x7FFE1234 is the address of a variable in RAM.
  • Hash digests — SHA-256 outputs 64 hex characters (256 bits).
  • IPv62001:0db8:85a3::8a2e:0370:7334 groups 16-bit hex blocks.
  • Unicode code points — the emoji 🔥 is at code point U+1F525 (hex 0x1F525 = decimal 128293).