Toolivaro

Free Number Base Converter

Convert integers between binary, octal, decimal, and hexadecimal with exact BigInt arithmetic — no rounding, fully local.

The number base converter translates integers between the four bases programmers actually use: binary (2), octal (8), decimal (10), and hexadecimal (16). Type a value in one base, pick the target base, and the tool returns the exact equivalent — 255 in decimal becomes ff in hexadecimal, 755 in octal, and 11111111 in binary. The arithmetic runs on BigInt, so conversion is exact for any magnitude: a 64-bit value like FFFFFFFFFFFFFFFF converts to 18446744073709551615 without the rounding or precision loss that plagues floating-point converters. Input is forgiving in the right ways: a leading minus sign is honored, and a literal prefix that matches the source base — 0x for hexadecimal, 0b for binary, 0o for octal — is stripped automatically, so values copied out of a debugger or a C-style constant work as pasted. Digits are validated strictly against the source base: 2 in binary or 8 in octal is rejected with a message that says which digits are allowed, rather than silently producing a wrong answer. Conversion of integers is exact by definition — this tool never approximates, and nothing you enter is uploaded, logged, or stored. Use it when you are decoding a bitmask, reading a memory dump, checking a hash prefix, translating an IPv4 octet, or any time a value in one base needs to become another.

Processed locally in your browser

A matching prefix (0x, 0b, 0o) is stripped automatically. Negative integers are supported.

How is the result calculated?

A bitmask from a configuration file

A config file enables features through a decimal bitmask, 490. To see which bits are on, convert 490 from decimal to binary: the result is 111101010 — bits 1, 3, 5, 6, 7, and 8 are set, counting from bit 1 at the right.

Example input and output
Input Value
value 490
fromBase 10
toBase 2
Result 111101010

What is the formula and its assumptions?

Positional conversion

value = Σ digitᵢ × baseⁱ (then re-render in the target base)

Formula terms
Symbol Meaning
digitᵢ the digit at position i, from the right, in the source base
base the source base: 2, 8, 10, or 16
re-render dividing the value by the target base and collecting remainders, producing the target-base digits

The tool converts with BigInt, so every intermediate step is exact regardless of magnitude.

What are the most common mistakes?

  • Reading 0x prefixes as decimal — a pasted constant like 0xFF is 255, not 0, and the converter strips the prefix for you when the source base matches.
  • Expecting floating-point converters to be exact at 64-bit magnitudes — BigInt conversion here is exact by construction.
  • Entering digits invalid in the source base (2 in binary, 8 in octal) and expecting a guess — the tool rejects with the allowed digits.

What are the assumptions and limitations?

  • Integers only: fractional input is rejected (binary fractions are rarely finite and the converter is honest about that).
  • Only bases 2, 8, 10, and 16 — bases like 3 or 36 are not supported.
  • Hex output is always lowercase; input accepts either case.

Where do the numbers come from?

Last reviewed August 11, 2026 · Version 1.0.0 · Toolivaro does not guarantee external content.

Frequently asked questions

Why BigInt instead of regular JavaScript numbers?

A 64-bit integer like 18446744073709551615 cannot be represented exactly in a 53-bit floating-point number — it would round to 18446744073709552000, a wrong answer. BigInt is exact at any magnitude, so the converter never silently rounds.

Can I paste values with a prefix like 0x or 0b?

Yes. A leading 0x, 0b, or 0o is stripped automatically when it matches the selected source base — 0x1A in hexadecimal is read as 1A. A prefix that contradicts the source base is treated as an invalid digit and rejected.

Why is the hex output lowercase?

Hexadecimal is case-insensitive — ff and FF are the same value. The converter emits lowercase, the convention used by most tooling, and accepts either case as input.

Does the converter handle fractional values like 3.5?

No. Fractional bases are a different problem (repeating digits are the norm — 0.1 in binary is infinite), so the converter is integer-only and rejects anything that is not a whole number with a clear error.

Part of Format and conversion tools

Found a mistake or have a correction? Report it — we review every correction.

Was this helpful?

Reviewed by the Toolivaro editorial team per our methodology Methodology · Editorial policy