sitekits.dev
press ⌘K to switch tools
FORMAT & CONVERT

Number Base Converter

Convert numbers between different bases.

local
number-base
§01 ABOUT THIS TOOL

Overview

Binary, octal, decimal, and hex are the four bases developers actually use — bit masks, Unix permissions, everyday values, and memory addresses or color codes. This tool keeps all four representations in sync: edit any one field and the other three recompute instantly. Because it is built on BigInt, values of any length convert exactly, unlike converters limited to 53-bit floats.

How to use

  1. Type an integer into any of the four fields: Binary (base 2), Octal (base 8), Decimal (base 10), or Hex (base 16).
  2. The other three fields update as you type.
  3. If a character is not valid for that field’s base, an error such as Invalid hex digits appears and the other fields keep their last valid value.

Examples

  • Decimal 255 → Binary 11111111, Octal 377, Hex ff
  • Hex deadbeef → Decimal 3735928559
  • Decimal 18446744073709551615 (2^64 − 1) → Hex ffffffffffffffff — exact, no rounding

Notes

Enter digits only — prefixes like 0x, 0b, or 0o are not accepted; the field itself determines the base. Hex input is case-insensitive.

FAQ
Is the number I enter sent anywhere?
No. Conversion happens entirely in your browser using JavaScript BigInt. No network request is made and nothing is stored.
Is there a size limit on the numbers?
Practically no. The tool uses BigInt rather than floating-point numbers, so values far beyond 2^53 convert exactly, with no rounding or precision loss.
Can I convert negative or fractional numbers?
No. The tool accepts non-negative integers only — digit validation rejects minus signs and decimal points, since bases 2, 8, 10, and 16 fields each allow only their own digit set.