HelperCrate

Number Base Converter

Convert binary, octal, decimal and hex live, with negative values and digit validation.

Your files never leave your device. Everything runs in your browser.

What Number Base Converter does

Number Base Converter shows the same value in decimal, binary, octal and hexadecimal at once. Type into any of the four fields and the other three update immediately, which makes it useful for reading bitmasks, memory addresses, file permission masks and colour channel values without reaching for a calculator.

The parser is stricter than a typical programming REPL. A leading minus sign is accepted, an 0x prefix is stripped before parsing, and each field only accepts digits that exist in its base. When something does not fit, the info line explains the problem instead of producing a wrong number.

The underlying value is a JavaScript number, so exact integer conversion stops at 9,007,199,254,740,991. Beyond that, the value is still parsed but loses low-order digits, and extremely long inputs are rejected as too large. Fractions and scientific notation are not accepted in any field.

How to use Number Base Converter

  1. Type a value into any of the four fields.
  2. Watch the remaining fields update as you type.
  3. Read the info line if a digit is not valid for the selected base.
  4. Correct the input or move to the field whose base matches the value you have.
  5. Use Copy all to copy all four labelled values to the clipboard.

Features

Tips and common mistakes

Frequently asked questions

How large a number can the converter handle exactly?

Up to 9,007,199,254,740,991, which is two to the 53rd power minus one. The converter uses JavaScript numbers rather than BigInt, so larger values are parsed but may lose their least significant digits.

Does it use two's complement for negative numbers?

No. A negative value is shown as a minus sign followed by the magnitude in each base, for example -10 decimal is -1010 binary. Two's complement is a fixed-width representation and would need a chosen bit width.

Can I convert fractions such as 10.5?

No. All four fields accept whole numbers only, because fractional digits behave differently in each base. Convert the integer and fractional parts separately if you need that.

What does the 0x prefix do?

It is removed before parsing, so it is safe to paste a hexadecimal literal such as 0xFF into the hex field. Because it is stripped everywhere, an 0x value pasted into the decimal field is interpreted as a decimal number without its prefix.

Why did the other fields stop updating?

The field you are typing in contains a digit that is invalid for that base, or the number is too large. The info line reports which case applies and the other fields keep their previous valid values.

Is anything sent to a server?

No. All conversion and validation happen locally in the browser.

Numbers are converted locally in your browser — nothing is uploaded.