Herramientas Guías
Developer Gratis Sin registro

Number Base Converter Pro

Convert numbers between any bases 2–36 with arbitrary precision, negatives, and floating point support.

Cargando la herramienta…

Acerca de esta herramienta

A comprehensive number base converter that handles bases 2 through 36. Enter a number in any base and instantly see its representation in all other common bases simultaneously. Supports arbitrary-precision integers, negative numbers, and floating-point binary fractions. Binary output is grouped into nibbles (4 bits) and bytes (8 bits) for easy reading. Step-by-step conversion working is shown for base-10 ↔ base-2 to help you learn the algorithm.

Cómo usar

  1. 1 Select the input base using the dropdown or type a custom base (2–36).
  2. 2 Type your number in the input field. Use A–Z for digits above 9.
  3. 3 All output bases update instantly. Toggle negative with the ± button.
  4. 4 For floating-point, include a decimal point (e.g. 3.14 in base 10).
  5. 5 Click 'Show Steps' to see the base-10 ↔ base-2 conversion working.

What a number base actually is

A base (or radix) is simply how many distinct digit symbols a counting system uses before it rolls over into a new column. Decimal — base 10 — uses ten digits, 0 through 9; binary uses two, 0 and 1; hexadecimal uses sixteen, adding AF for the values ten through fifteen. The position of each digit carries a weight that is a power of the base. The decimal number 255 means 2×10² + 5×10¹ + 5×10⁰. Change the base and the same value wears a different costume: 255 is FF in hex, 377 in octal, and 11111111 in binary. This converter shows all of those simultaneously, plus base 32 and base 36, so you can read one value across six systems at once.

How the conversion works under the hood

Converting into the tool's internal value uses positional weights: each digit is multiplied by the base raised to its position and summed. Converting out to another base uses repeated division — divide by the target base, record the remainder, repeat with the quotient, then read the remainders bottom-up. Toggle Show Steps and the tool prints both directions explicitly so you can follow the arithmetic rather than just trust the answer.

Crucially, the integer part is handled with BigInt, JavaScript's arbitrary-precision integer type. That means a 40-digit binary string or a giant hex value converts exactly, with no rounding error — unlike a naive converter that would lose precision once a number exceeds about 9 quadrillion. Fractional parts (after a decimal point) are converted separately by repeatedly multiplying by the base and peeling off the integer part, up to 20 places.

A worked example: 255 in every base

BaseRepresentationWhy
2 (binary)11111111Eight 1-bits = 2⁸ − 1
8 (octal)3773×64 + 7×8 + 7
10 (decimal)255The familiar form
16 (hex)FF15×16 + 15
327V7×32 + 31 (V = 31)
36737×36 + 3

The Binary Grouping panel additionally splits the binary form into 4-bit nibbles (1111 1111) and 8-bit bytes (11111111) and reports the bit width — handy for spotting that 255 fills exactly one byte, while 256 needs nine bits.

Practical use cases

  • Reading hex in code and design. Color values like #FF8000, memory addresses, and Unicode code points are all hex; converting to decimal tells you the actual numbers involved.
  • Understanding bitmasks and flags. Seeing that 0x0F is 00001111 in binary makes it obvious which bits a mask selects.
  • Shortening identifiers. Base 36 packs digits and all 26 letters into each position, so it encodes large IDs in fewer characters than decimal — useful for compact URLs and keys.
  • Learning and homework. The step view doubles as a worked solution for a computer-science or math assignment.

Common mistakes to avoid

  • Using out-of-range digits. If you set the input base to 2, only 0 and 1 are valid. Typing a 2 or a stray letter triggers an "invalid characters for base" error; switch the input base to match your number.
  • Confusing prefixes with digits. The outputs add prefixes like 0X, 0B, and 0O for clarity, but the prefix is not part of the value — 0xFF is the same number as FF.
  • Expecting exact fractions in every base. Just as 1/3 has no finite decimal, many fractions don't terminate in binary; the result is truncated at 20 digits, so treat fractional conversions as approximations.
  • Negative numbers. Use the ± toggle for a negative value; the tool shows a leading minus sign rather than two's-complement bits.

Why hexadecimal and octal exist at all

Binary is how machines store everything, but long binary strings are miserable for humans to read — a single byte is eight characters, and an error is easy to miss. Hexadecimal solves this because each hex digit maps to exactly four binary bits (a nibble), so one byte is always two clean hex characters: 11111111 becomes FF. Octal plays the same role with three bits per digit, which is why Unix file permissions like 755 are octal — each digit packs the read/write/execute bits for one group. Seeing all three side by side, as this converter shows them, makes those mappings concrete rather than abstract.

Bases beyond 16

The tool also covers base 32 and base 36, and supports any custom base from 2 to 36 through the dropdown. Base 36 is the largest that fits using just digits and the 26 Latin letters (0-9 then a-z), which is why it appears so often in short links and database identifiers: it expresses a large value in the fewest readable characters. Base 32 deliberately omits easily confused characters in some real-world variants, but here it uses the straightforward 0-9a-v mapping so you can see the raw positional math.

Privacy

Every conversion runs entirely in your browser using built-in BigInt arithmetic. Nothing you type is uploaded, logged, or stored, so even sensitive identifiers or large keys stay on your own device. You can confirm this by disconnecting from the network — the converter keeps working.

Preguntas frecuentes

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}