Radix Converter

Dual-pane radix converter: pick source and target bases (2–36) in the header, paste an integer on the left—supports 0x hex prefixes and bigint-sized bit masks—Convert or use decimal to hex / binary to decimal shortcuts; copy the result on the right.

Positional notation and base conversion

Integers written in base b use digits 0…b−1; each position is a power of b. Developers jump between decimal, binary, and hexadecimal when reading masks, color literals, memory addresses, and permission octals—conversion is the same algorithm with a different radix.

This tool uses arbitrary-precision integers for bases 2–36. For text↔hex of bytes use the Hex encoder; for bit strings use Binary encoder; for KB/MB scaling (not radix) see Byte unit converter.

Radix, digits, and exact integers

How positional base notation works

  1. The rightmost digit is b⁰, each step left multiplies the place value by b.
  2. Valid digits in base b are the first b symbols of 0–9 and a–z (case-insensitive input).
  3. Leading zeros are cosmetic in pure math but sometimes significant in fixed-width hardware fields.
  4. Fractions need a radix point; this page converts whole integers only.

Binary, octal, decimal, and hexadecimal

  1. Binary (base 2) maps directly to bits—common for flags and netmasks.
  2. Octal (base 8) groups three bits per digit—Unix file modes like 755 are octal triplets.
  3. Decimal (base 10) is the everyday human default.
  4. Hexadecimal (base 16) packs four bits per digit—0x prefixes in C-like languages strip before parse here.

Big integers and overflow-free conversion

  1. JavaScript Number is IEEE double—integers above 2⁵³−1 lose precision if you use Number alone.
  2. Parsing through bigint keeps large constants (64-bit masks, crypto-sized values) exact in the pipeline.
  3. Output is normalized without leading zeros except the single digit zero.
  4. Invalid digits for the chosen source base fail fast instead of silently truncating.

Radix vs encoding (hex text of bytes)

  1. Radix conversion changes how one integer is written—value stays the same abstract number.
  2. Hex encoding of UTF-8 text produces two nybbles per byte—that is not the same as parsing 0xdeadbeef as one integer.
  3. Use radix tools for constants; use Hex encoder when the payload is character data.
  4. Color #RRGGBB is often treated as a 24-bit integer—convert its hex literal here after removing #.

Typical uses

Bit masks and register dumps

Flip between hex constants and binary strings for documentation.

chmod and permission literals

Confirm octal 755 against decimal or binary expansions.

Frequently asked questions

How to convert binary to hexadecimal?
Set source base 2, target 16, paste bits, Convert—or use the decimal to hex shortcut.
Hex to decimal converter online?
Source base 16, target 10; optional 0x prefix is stripped automatically.
Binary to decimal for large numbers?
Uses bigint—paste long bit strings without floating-point rounding.
What bases are supported?
Any integer base from 2 through 36 inclusive.
Does 0x work on hex input?
Yes—a leading 0x (case-insensitive) is removed before parsing base-16 digits.
Radix converter vs hex encoder?
Radix converts one integer string between bases. Hex encoder encodes arbitrary text bytes to hex.
Why does my hex color need conversion?
Removing # and treating RRGGBB as base-16 yields the decimal integer some APIs expect.
Octal chmod 755 in decimal?
Set from 8 to 10—the decimal value is what some calculators show as the same permission bits.