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

Exact conversion between any bases on BigInt, with fixed-width integer views, bitwise algebra and IEEE-754

Runs locally in your browserMore converters & encodersJump to full guide

Related reading

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

Initializing in your browser…

You might also like

Unix Timestamp Converter

Convert between Unix timestamps and dates in any of 400+ time zones, in seconds, milliseconds, microseconds or nanoseconds

Audio Format Converter

Convert between MP3, WAV, OGG, AAC, M4A and FLAC with a bitrate, sample rate, channel count and bit depth that all reach the encoder, and a panel that reports what was actually written.

Base64 Encoder/Decoder

Encode and decode text, files and JSON as base64, base64url or hex, checked by decoding the result back

An example conversion

A register dump gives you a 64-bit hex value and you need it in decimal, plus what it looks like masked into 32 bits.

Input

0xDEADBEEFCAFEBABE, base 16
What Number Base Converter produces

Converted

Decimal  16045690984503098046
Binary   1101 1110 1010 1101 ... 1011 1110
Octal    1572555756771277535276

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

Everything runs on BigInt, so the value is exact: a converter built on JavaScript numbers holds 53 bits and returns 16045690984503097000 instead. Fixed-width rows are produced by masking, so the 32-bit row shows the low half that storing it there would actually keep, starred because bits were discarded. Digits that do not belong to the base are rejected with the character named, rather than silently truncated the way parseInt truncates 1012 read as binary into 2.

What this converter does

Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36, plus base58 with the Bitcoin alphabet. Everything runs on BigInt, so a value is exact at any size: paste the 64-bit maximum and you get 18446744073709551615, not 18446744073709552000. A converter built on JavaScript numbers, which is what most of them are, holds only 53 bits exactly and silently rounds anything larger. Beyond conversion there are three more modes: a bitwise calculator that works at a width you choose up to 128 bits, an IEEE-754 inspector that handles subnormals, infinities and NaN properly, and an ASCII table. Together they make a small workbench for low-level work: memory addresses, register masks, protocol fields and floating-point surprises.

How it works

Base Converter parses your input in the base you select and rejects anything that is not a digit in it. That sounds obvious and is where most tools go wrong: `parseInt` stops at the first character it cannot use and returns what it had, so 1012 read as binary quietly becomes 2 and 12G read as hexadecimal becomes 18. Here each digit is checked first, and an input that does not belong to the base gets an error naming the offending character and listing the digits the base actually uses. The 0x, 0b and 0o prefixes are accepted when they match the selected base and rejected with an explanation when they do not, and underscores and spaces are accepted as group separators.

Fractional values work too. Enter 1.101 in binary and get 1.625 in decimal exactly; enter 0.1 in decimal and get 0.000110011... in binary, marked as non-terminating, because a fifth is not a sum of halves. The tool works out whether the expansion terminates in the target base rather than leaving you to wonder whether the digits ran out or the tool did.

Every value is also shown as a fixed-width integer at 8, 16, 32, 64 and 128 bits, unsigned and as two's complement. The reduction is a mask, not a subtraction: 1000 at 8 bits is 232 unsigned and -24 signed, which is what storing it in a byte would actually keep, rather than the 744 you get by subtracting 256 from anything over 127. A row that did not fit is starred, so you can see that bits were discarded rather than assuming the number survived.

Bitwise mode computes NOT, AND, OR, XOR, NAND, NOR, XNOR, logical and arithmetic shifts, and left and right rotations, at 8, 16, 32, 64 or 128 bits. JavaScript's own bitwise operators coerce their operands to 32 bits, so 2^31 shifted left comes out as 0 and any operand past 2^32 is silently a different number; everything here is BigInt at the stated width, so a 64-bit mask behaves like a 64-bit mask.

The IEEE-754 inspector decodes half, single and double precision. It reports which kind of value you have, and the formula it shows is true of that kind: a normal number has an implicit leading 1 and an exponent of e minus the bias, a subnormal has an implicit leading 0 and an exponent of 1 minus the bias, and infinity and NaN have no significand formula at all. Writing "1.mantissa x 2^(e - bias)" for every value, which is the usual shortcut, is wrong for zero, for every subnormal and for both infinities and every NaN. It also shows the value the format actually stores next to the value you typed, so entering 0.1 as a single tells you it is really 0.10000000149011612, about 1.49e-9 away. Quick buttons load pi, e, a third, infinity, NaN and the format's largest, smallest normal and smallest subnormal values.

The ASCII table covers 0 to 127 in decimal, hex, octal and binary, coloured by class, and a click copies the character. Everything runs locally in your browser.

How to use

  1. 1In Base Converter, type a number and pick the base it is written in. Any base from 2 to 36 works, and base58 too.
  2. 2Read it in binary, octal, decimal and hex at once, plus any other base you pick.
  3. 3Look at the fixed-width table to see how the value would sit in a byte, a short, an int or a long, signed and unsigned.
  4. 4Switch to Bitwise for masks and shifts at a chosen width, Float for an IEEE-754 breakdown, or ASCII for the character table.

Key features

  • Exact at any size: BigInt throughout, so the 64-bit and 128-bit maxima convert without rounding
  • Digits outside the base are an error naming the character, not a silently truncated prefix
  • Any base from 2 to 36, plus base58 with the Bitcoin alphabet
  • Fractional values, with a warning when the expansion does not terminate in the target base
  • Fixed-width views at 8, 16, 32, 64 and 128 bits, unsigned and two's complement, reduced by masking
  • A star on any width the value does not fit in, so discarded bits are visible
  • Bitwise NOT, AND, OR, XOR, NAND, NOR, XNOR, logical and arithmetic shifts, and rotations, at the width you choose
  • IEEE-754 half, single and double, with subnormals, infinities and NaN each described correctly
  • The value the format actually stores shown next to the value you typed, with the rounding error
  • Quick values for pi, e, infinity, NaN and the format extremes
  • ASCII table in four bases, coloured by class, click to copy
  • Grouped binary display for readability

Frequently asked questions

What is the largest number supported?

There is no practical limit. Everything runs on BigInt, so the 64-bit maximum converts to exactly 18446744073709551615 and the 128-bit maximum to 340282366920938463463374607431768211455. A converter built on JavaScript numbers rounds anything past 9007199254740991.

Can I convert to bases other than binary, octal, decimal and hex?

Yes, any base from 2 to 36 using digits 0-9 and A-Z, and base58 with the Bitcoin alphabet, which leaves out 0, O, I and l so a digit cannot be misread.

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 the base uses. It is not silently truncated, which is what parseInt does: 1012 read as binary would otherwise give 2, because parsing stops at the 2 and returns what came before it.

Can I enter negative numbers?

Yes, with a leading minus. The fixed-width table then shows the two's complement pattern at each width, so -1 reads as 255 in a byte and 18446744073709551615 in a 64-bit word.

Can it convert fractions?

Yes. 1.101 in binary is 1.625 in decimal exactly. Where the expansion does not terminate, such as 0.1 in decimal converted to binary, the tool shows 24 digits and says the fraction does not terminate rather than leaving you to guess.

Why does my 64-bit mask give a different answer here than in the browser console?

Because JavaScript bitwise operators coerce to 32 bits. In the console, 2 ** 31 << 1 is 0 and anything above 2^32 is truncated first. This tool works at the width you select, on BigInt, so a 64-bit operation is really 64 bits.

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.