Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Converters & Encoders
  3. Number Base Converter
Add to favorites

Number Base Converter

Convert between binary, octal, decimal, hex and any base to 36 exactly at any size, with bitwise operations, IEEE-754 floats and an ASCII table.

Runs locally in your browserMore converters & encodersJump to full guide
Related readingNumber Systems: Understanding Binary, Hexadecimal, and Octal8 min

Initializing in your browser…

You might also like

Unix Timestamp Converter

Convert Unix timestamps to dates and dates to timestamps in any time zone, with seconds, milliseconds, microseconds and nanoseconds detected automatically.

Audio Format Converter

Convert audio between MP3, M4A, WAV, FLAC, OGG and AAC in your browser, with a choice of quality, sample rate, channels and bit depth.

Base64 Encoder/Decoder

Encode and decode text, files and JSON as base64, base64url or hex as you type, with a check that every result decodes back exactly.

An example conversion

A crash dump shows a 64-bit register as 0xDEADBEEFCAFEBABE and you need its decimal value, plus what a 32-bit field would have kept of it.

Number, written in hex

DEADBEEFCAFEBABE
What Number Base Converter produces

Converted

Decimal  16045690984503098046
Octal    0o1572555756771277535276
Binary   0b1101 1110 1010 1101 1011 1110 1110 1111
           1100 1010 1111 1110 1011 1010 1011 1110

32-bit   unsigned 3405691582   signed -889275714   * does not fit
64-bit   unsigned 16045690984503098046   signed -2401053089206453570

The value needs all 64 bits, far beyond the 53 bits an ordinary JavaScript number holds exactly, which is why a typical converter prints 16045690984503097000. Here the arithmetic is exact, so the decimal ends in ...098046. The top bit is set, so the same pattern read as a signed 64-bit integer is negative. A 32-bit field keeps only the low half, 0xCAFEBABE, which is 3405691582 unsigned or -889275714 as two's complement, and the row is starred because the high half was lost. 46 of the 64 bits are set.

What this converter does

Convert whole numbers and fractions between binary, octal, decimal, hexadecimal and any base from 2 to 36, plus base58, exactly at any size. Three more modes cover the rest of low-level number work: bitwise operations at a width you choose, a breakdown of how a value is stored as a 16, 32 or 64-bit floating-point number, and an ASCII table.

How it works

Most online converters use ordinary JavaScript numbers, which hold only 53 bits exactly. Anything larger is rounded without warning, so the largest 64-bit value, 18446744073709551615, comes back as 18446744073709552000. This tool does its arithmetic on arbitrary-precision integers, so a 64-bit register, a 128-bit identifier or a 200-digit number converts exactly, digit for digit.

Your input is checked against the base you choose before anything is converted. A digit that does not belong, such as a 2 in binary or a G in hexadecimal, produces an error that names the character and lists the digits the base uses, instead of quietly converting only the part before it. The 0x, 0b and 0o prefixes are accepted when they match the selected base; when they do not, the error offers to switch the base for you. Spaces and underscores between digits are ignored, so you can paste 1101 0110 or 0xFFFF_0000 as written.

Fractions work as well. 1.101 in binary is exactly 1.625 in decimal. Going the other way, 0.1 in decimal has no finite binary form, because a tenth cannot be built from halves, quarters and eighths; the tool shows 24 digits and says the expansion does not terminate, so you know the digits were cut off rather than finished. Negative numbers take a leading minus sign, and copying a negative hex value gives -0xFF rather than a malformed 0x-FF.

The fixed-width view shows how the value would sit in an 8, 16, 32, 64 or 128-bit integer, unsigned and as two's complement. A value that is too large is reduced the way hardware does it, by keeping the low bits, and the row is starred: 1000 stored in a byte becomes 232, or -24 when read as signed. Bitwise mode applies NOT, AND, OR, XOR, NAND, NOR, XNOR, logical and arithmetic shifts, and rotations at exactly the width you select, which matters because a browser console's own bitwise operators work at 32 bits only.

Float mode takes a decimal and shows exactly how IEEE-754 half, single or double precision stores it: the sign, exponent and mantissa bits, the hex pattern, and a formula that is correct for normal numbers, subnormals, zero, infinity and NaN. It then compares the stored value with the decimal you typed, digit by digit. Enter 0.1 and it tells you that even double precision holds a value with 55 decimal places, starting 0.10000000000000000555, about 5.551e-18 away. Everything runs in your browser.

How to use

  1. 1Type a number and choose the base it is written in: binary, octal, decimal, hex, or any other base from the Other base list.
  2. 2Read the result in all four common bases at once and press the copy button beside the one you need. Pick any other base in the last row.
  3. 3Open the fixed-width section to see how the value fits in 8 to 128-bit integers, signed and unsigned.
  4. 4Switch to Bitwise to combine two values with AND, OR, XOR and friends, or to shift and rotate at a chosen width.
  5. 5Switch to Float to see how a decimal is stored in 16, 32 or 64-bit floating point, and whether it is stored exactly.
  6. 6Use ASCII for the character table; click any row to copy the character.

Key features

  • Exact at any size, including 64-bit and 128-bit values
  • Any base from 2 to 36, plus base58 with the Bitcoin alphabet
  • Invalid digits named with the base's allowed digits, and a one-click fix for a 0x, 0b or 0o prefix that names another base
  • Fractions, with a clear note when an expansion does not terminate
  • Negative numbers, with two's complement shown at every width
  • Bitwise NOT, AND, OR, XOR, NAND, NOR, XNOR, shifts and rotations at 8 to 128 bits
  • IEEE-754 half, single and double precision, with subnormals, infinity and NaN described correctly
  • The exact decimal value a float stores, and how far it is from what you typed
  • An ASCII table in decimal, hex, octal and binary, with click to copy
  • Each result one click to copy, with the 0b, 0o or 0x prefix

Tips & best practices

  • Paste values with spaces or underscores between groups, such as 1111 0000 or 0xFFFF_FFFF; the separators are ignored.
  • The copy buttons include the prefix (0b, 0o, 0x), which is what most programming languages expect.
  • To find which bits differ between two values, put them in Bitwise mode as A and B and read the XOR row.
  • In Float mode, try the Smallest subnormal button for each format to see where precision runs out.

Where this fits

  • Reading a register or memory dump

    Paste a 64-bit hex value and get its exact decimal value, its binary pattern in groups of four, and what it would read as in a 32-bit signed integer.

  • Building and checking bit masks

    AND a status word with a mask, XOR two values to find the bits that differ, or rotate a hash state, all at 64 bits without a calculator that silently drops to 32.

  • Explaining floating-point surprises

    Show a colleague why 0.1 + 0.2 is not 0.3 by putting 0.1 into Float mode and reading the value a double really holds.

  • Working with short identifiers

    Convert numeric IDs to base 36 or base58 for compact URLs and back again, exactly, however long the number is.

Frequently asked questions

Is there a limit on how big a number can be?

No practical one. The arithmetic uses arbitrary-precision integers, so the 64-bit maximum converts to exactly 18446744073709551615 and the 128-bit maximum to all 39 of its digits. Converters built on ordinary JavaScript numbers start rounding past 9007199254740991.

What happens if I type a digit that does not belong to the base?

You get an error naming the character and listing the digits that base uses. If you typed a prefix such as 0x while another base is selected, the error offers to read the number in the base the prefix names.

Can I convert negative numbers and fractions?

Yes. Put a minus sign in front for a negative number; the fixed-width view then shows its two's complement form, so -1 is 255 in a byte. Fractions such as 1.101 in binary or 3.75 in decimal convert exactly when the result terminates, and are shown to 24 digits with a note when it does not.

What is base58?

A base used for Bitcoin addresses and many short IDs. It drops 0, O, I and l from the usual letters and digits so that no character can be mistaken for another when read aloud or copied by hand.

Why does the browser console give a different answer for my 64-bit mask?

JavaScript's bitwise operators convert their operands to 32-bit integers first, so shifting 2^31 left by one gives 0 in the console. Bitwise mode here works at the width you select, so a 64-bit shift really is 64 bits.

Why does Float mode say 0.1 is not stored exactly in double precision?

Because a tenth has no finite binary form. Double precision stores the nearest value it can, which starts 0.10000000000000000555 and runs to 55 decimal places. The tool compares that with the decimal you typed, digit by digit, and shows the gap.

Does 16-bit (half precision) rounding follow the standard?

Yes. Values are rounded to the nearest representable half-precision number, with exact ties going to the one with an even last bit, which is the IEEE-754 default. Values from 65520 upward overflow to infinity.

Further reading

  • Number Systems: Understanding Binary, Hexadecimal, and Octal8 min read

Private by design

Conversions run on your device in JavaScript. The values you enter are never sent over the network.