Skip to content

Menu

Number Base Converter

Convert between binary, octal, decimal, and hexadecimal with bit representation.

Runs entirely in your browserEncodingFree, no sign-up
Loading tool

01What is Number Base Converter?

Number Base Converter shows one whole number in binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) side by side. There are four linked fields. Type in any of them and the other three update on every keystroke, so there is no Convert button to hunt for. Under the hood, all the arithmetic runs on JavaScript's BigInt type. That matters more than it sounds. A normal JavaScript number loses precision past 2^53, so 18446744073709551615 would quietly round. Here it converts to exactly FFFFFFFFFFFFFFFF, and much longer values work too. Each field validates its own digits before converting. Type a 2 in the binary field or a G in the hex field and you get an error that names the bad character, for example "Invalid character '2' for base 2". You never get a half-parsed result. The binary, octal and hex fields accept an optional 0b, 0o or 0x prefix, which matches the literal syntax in the ECMAScript spec. The decimal field is stricter on purpose. It takes digits and an optional leading minus only, so 1e3 or 0x1F typed there is rejected rather than guessed at. Negative numbers are shown as a minus sign plus the magnitude, so -42 becomes -101010, -52 and -2A. The tool does not show two's complement. That form only makes sense for a fixed width like 8, 32 or 64 bits, and the tool doesn't assume one. Here's a quick worked example. Type 755 into the Octal field. Decimal shows 493, Hexadecimal shows 1ED and Binary shows 111101101. Those are the familiar rwxr-xr-x permission bits, three per octal digit. Below the fields sits a Bit Representation panel. It pads the binary value on the left to whole 4-bit nibbles and spaces them out, so 511 reads as 0001 1111 1111. It also shows the bit count and the decimal value with thousands separators. Each field has its own copy button, and Reset clears all four at once. The page does its sums with your browser's BigInt and has no server step, so the values you paste stay on your own machine. There are real limits, though. It handles integers only, so fractions like 0.5 or 1.1 in binary are out of scope. It covers only these four bases, so base 36 or base 64 needs a different tool. And for a negative input the bit panel shows the magnitude, with the sign noted separately.

Embedded and systems developers who need to read register values, memory offsets and permission bits in whichever base the docs happen to use. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Number Base Converter

  1. Type a whole number into the Binary (Base 2), Octal (Base 8), Decimal (Base 10) or Hexadecimal (Base 16) field. A 0b, 0o or 0x prefix is optional in the matching field.
  2. Watch the other three fields update as you type.
  3. If a field turns red, read the error. It names the character that doesn't belong in that base.
  4. Check the Bit Representation panel for the value in 4-bit groups, its bit count and the decimal value with separators.
  5. Click the copy icon next to any field to copy that value, or Reset to clear everything.

03Worked examples

Input: Decimal 255
Result: Binary 11111111, Octal 377, Hex FF
The Bit Representation panel shows this as 1111 1111, 8 bits.
Input: Hex 0xDEADBEEF
Result: Decimal 3735928559, Octal 33653337357, Binary 11011110101011011011111011101111
The 0x prefix is optional. The bit panel reports 32 bits = 3,735,928,559.
Input: Octal 777
Result: Decimal 511, Hex 1FF, Binary 111111111
The bit panel pads this to 0001 1111 1111 for display. The value is unchanged.
Input: Decimal -42
Result: Binary -101010, Octal -52, Hex -2A
Negatives are shown as sign plus magnitude, not two's complement.
Input: Decimal 18446744073709551615
Result: Hex FFFFFFFFFFFFFFFF, Octal 1777777777777777777777, Binary 64 ones
The largest unsigned 64-bit value. BigInt keeps it exact. Binary trimmed here.
Input: Binary 12
Result: Error: Invalid character '2' for base 2
The decimal field gives its own error for input like 1e3: Invalid decimal number (digits only, optional leading minus).

04Common use cases

  • Turning a 32-bit register dump such as 0xDEADBEEF into binary to see which flag bits are set
  • Checking that a decimal constant in C or Rust really fits a u64 by converting it to hex and counting digits
  • Reading chmod values like 755 or 644 as binary rwx bits before changing a deploy script
  • Converting hex opcodes or memory offsets from a disassembler into decimal for a bug report
  • Confirming the largest value of an unsigned 64-bit integer without float rounding errors
  • Teaching students how one value looks in four bases while they type

05Tips

  • Each hex digit maps to exactly four bits, so you can read hex as binary digit by digit: A is 1010, F is 1111 and 0 is 0000.
  • Need two's complement? Add 2^width to the negative value and convert that. For -1 in 8 bits, enter 255 and you get 1111 1111.
  • Paste hex into the Hexadecimal field, not Decimal. The decimal field refuses 0x1F on purpose so a value is never read in the wrong base.
  • Each octal digit maps to three bits, which is why Unix permissions are written in octal. 0644 is 420 in decimal and 110100100 in binary.

06Related concepts

Two's complement, BigInt, Radix, Bitwise operations.

Frequently Asked Questions

What is Number Base Converter?

Number Base Converter is a free, browser-based developer tool on AIDToolStack. Convert between binary, octal, decimal, and hexadecimal with bit representation. It requires no installation or sign-up and works entirely in your browser.

Is Number Base Converter free to use?

Yes. No sign-up, no fees and no usage cap.

Does Number Base Converter store my data?

No. It runs in your browser; nothing is uploaded.

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe