Too Much Tools logoToo Much Tools

Number Base Converter

Convert integers between hex, decimal, binary, octal and any base (2–36), locally.

Local, Runs entirely in your browser, your data never leaves your device.
Loading tool…

Convert an integer between any two bases

This tool takes an integer typed in one base and shows it in binary, octal, decimal and hex at once, plus a custom base you set yourself from 2 to 36. It's built on BigInt rather than JavaScript's Number type, so it stays exact for values well past Number.MAX_SAFE_INTEGER, which matters when you're converting a large hash, a bitmask or an ID that a regular calculator would silently round. Conversion happens locally as you type.

How to use the Number Base Converter

  1. Type a number into the input field, such as 255 or ff.
  2. Pick the input base from the dropdown: Binary, Octal, Decimal or Hex.
  3. Read the same value rendered in all four common bases in the rows below.
  4. Set a custom base from 2 to 36 in the field at the bottom for anything outside the common four.
  5. Copy any row's value, or send it to another tool with the send-to menu.

Common prefixes are tolerated when they match the chosen input base: 0x for hex, 0b for binary, 0o for octal. Underscores and spaces inside the number are stripped before parsing, so 1010_1100 and FF FF both work.

Base 36 is the practical ceiling because digits reuse the Latin alphabet after 0–9 (a–z), so there are only 36 distinct single characters available to represent a digit.

Frequently asked questions

Can I convert negative numbers between bases?
Yes, a leading minus sign is preserved through the conversion, so -255 in decimal converts to -11111111 in binary and -ff in hex, with the sign kept out of the digit parsing.
How large a number can this handle?
There's no practical size limit, since the parser accumulates digits into a BigInt rather than a floating-point Number, so it stays exact for numbers far beyond what Number.MAX_SAFE_INTEGER can represent precisely.
Does it support decimal (fractional) values?
No, only whole integers. Entering a decimal point or a fractional part isn't recognized by the digit parser, which is built around whole-number place value for the target base.
Why does 0x or 0b not work as a prefix in every base?
Those prefixes are only stripped when they match the base you selected, for example 0x is only recognized when the input base is hex, so a stray 0x in a binary field is treated as invalid digits instead.