Loona Automation logoLoona Developer Tools
Home › Developer Tools › Number Base Converter

Number Base Converter - Binary, Octal, Decimal and Hex, Exactly

In short: the Number Base Converter converts integers between binary, octal, decimal and hexadecimal using arbitrary-precision arithmetic, so values far beyond the usual 2^53 JavaScript limit convert exactly, digit for digit - and invalid digits are called out by name.

File permissions, color codes, memory addresses, bitwise flags - bases are everywhere in development. Type a value in any base and read it in all four, with precision that does not silently round your big numbers away.

Binary-
Octal-
Decimal-
Hex-
Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the Number Base Converter

  1. Type or paste the number into the Value box.
  2. Choose which base the value is written in.
  3. Read the same value in binary, octal, decimal and hexadecimal - results update as you type.
  4. Use the Copy buttons to take any representation with you.

How it works

The converter first validates every character against the digits allowed in your chosen base - enter a 2 in a binary value and it tells you exactly that, instead of guessing. It then builds the value with arbitrary-precision integer arithmetic (BigInt): each digit multiplies the running total by the base and adds itself, a process that stays exact for numbers of any length. Finally it renders that exact value in each of the four bases. Negative values keep their sign through every step.

Worked example

The decimal value 18446744073709551617 - one more than 2^64 - is larger than any normal JavaScript number can hold exactly. Here it still converts precisely: hexadecimal 10000000000000001, and a 65-digit binary string ending in 1, where a floating-point converter would quietly round it.

Frequently Asked Questions

Is this number base converter free?

Yes - completely free, with no sign-up, no size limit and no daily cap.

How large a number can it convert?

Effectively unlimited. The conversion uses BigInt arithmetic, so values with hundreds of digits convert exactly. The familiar 2^53 limit of ordinary JavaScript numbers does not apply.

Does it handle fractions like 3.14?

No - this converter is for integers, which is what bases are used for in practice (addresses, permissions, colors, flags). A decimal point in the input is reported as an invalid digit rather than silently dropped.

What if I type a digit that does not exist in the base?

You get a specific error naming the digit and the base - for example, digit "8" cannot appear in an octal value, and "g" cannot appear in hexadecimal.

Is my input uploaded to a server?

No. Conversion happens 100% in your browser. Your values never leave your device.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.