About this tool
Convert numbers between binary, octal, decimal, hex, and base36.
This base converter rewrites a number in any positional base from 2 to 36 — binary, octal, decimal, hexadecimal, base 36 and everything between — using repeated division for the integer part and repeated multiplication for the fraction. Integers are handled as BigInt, so a 200-digit value converts exactly, and fractions are carried as exact rationals instead of being rounded through a 64-bit float. It is built for developers reading hex dumps and bit masks, and for students checking base-conversion homework.
Open Base Converter on AltFTool — it loads instantly in your browser.
Type the value into the Number field — the placeholder shows the accepted shapes (255, DEAD.BEEF, -1010.11…). Spaces, underscores and commas are ignored, and the input takes up to 4096 characters.
Set Input base to the base the number is written in; the dropdown lists every base from Base 2 · Binary through Base 36.
The results update as you type, listing Binary (0b), Octal (0o), Decimal, Hexadecimal (0x) and Base 36 together with the bit and byte length; use Extra base to show to add any other base from 2 to 36 to that list, and read the Grouped for reading and Fixed-width types it fits in tables below it.
Drag the Fraction digits slider (0 to 60, default 20) to set how far a recurring fraction expands — anything cut short is marked …recurring. Then use Copy result to copy every conversion, or Reset to return to the defaults.
BigInt arithmetic means a 200-digit integer converts without a single rounded digit.
Marks any expansion that recurs rather than silently truncating it and calling it exact.
Reports bit length, byte count, and whether the value fits an 8, 16, 32, 64 or 128-bit signed or unsigned type.
Divide by 2 repeatedly and read the remainders bottom to top. 255 ÷ 2 gives remainder 1 eight times in a row, so 255 is 11111111 in binary — 8 bits, which is exactly the largest value an unsigned 8-bit integer can hold.
Because the standard digit alphabet is 0-9 followed by A-Z, which is 10 + 26 = 36 symbols. Past that there is no agreed notation for the next digit, which is why JavaScript's own Number.toString has the same 36 limit.
Because a fraction terminates in base b only when its denominator's prime factors all divide b. One tenth is 1/(2 × 5), and binary has only the factor 2, so the 5 never divides out and the expansion 0.0001100110011… repeats forever. The same fraction ends immediately in base 10 and in base 20.
Up to 4,096 characters of input, which is well past a 4,000-bit integer — far larger than any fixed-width type. There is no floating-point step anywhere in the conversion, so precision does not degrade as the number grows.
Add the Base Converter widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/base-converter"
title="Base Converter — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/base-converter?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>