Number Base Converter

Convert numbers between decimal, binary, octal, hexadecimal, and any custom base from 2 to 36 — type in any field and the rest update live. Plus a signed two's complement converter for 8-, 16-, and 32-bit values.


Supports non-negative whole numbers only. Values update live as you type.

Two's Complement Converter

Convert signed integers to and from two's complement binary and hex at a chosen bit width.

Enter a signed integer, or a two's complement binary/hex pattern, for the selected bit width.

How to Convert Between Number Bases

  1. Type a number into any one of the five fields: Decimal, Binary, Octal, Hexadecimal, or a Custom Base of your choice (2-36).
  2. The other fields update instantly with the equivalent value in their base.
  3. Each field only accepts valid characters for its base, so typos are filtered out automatically. Change the Custom Base number at any time to redisplay the same value in a different base.
  4. Clear a field to reset the whole group, then start fresh.
  5. For signed values, use the separate Two's Complement Converter: pick a bit width (8, 16, or 32), then type a signed decimal number, or its two's complement binary or hex pattern, into any of its three fields.

Frequently Asked Questions

Does this support negative numbers?

The main decimal/binary/octal/hexadecimal/custom-base converter above only supports non-negative integers (0 and up) — arbitrary-precision binary, octal, and hexadecimal representations of negative numbers depend on a bit width and encoding this tool can't assume on your behalf. If you need signed values, use the separate Two's Complement Converter section below, where you pick an 8-, 16-, or 32-bit width and enter a negative or positive number directly.

What happens if I type an invalid character?

Each field filters out characters that aren't valid in its base as you type — for example, the binary field only accepts 0 and 1, the octal field only accepts 0-7, and the custom base field only accepts the digits valid for whichever base (2-36) is currently selected — so you can't enter something that field's base can't represent. If a field ends up empty or unparseable, the other fields in that section are simply cleared instead of showing an error.

Why does the hexadecimal (and custom base) output use uppercase letters?

Uppercase letters (A-F for hex, or A-Z for higher custom bases) are simply this tool's display convention and are the most common style in documentation and programming references. The hex and custom base input fields themselves accept both uppercase and lowercase letters.

Is there a limit to how large a number I can convert?

This tool uses standard JavaScript number parsing, which reliably handles integers up to 2^53 - 1 (9,007,199,254,740,991). Beyond that, floating-point precision limits mean extremely large numbers may lose accuracy.

Do I need to click a button to convert?

No — conversion happens instantly as you type in any of the five fields in the main converter (decimal, binary, octal, hexadecimal, or custom base), and the same is true for the three fields in the Two's Complement Converter. There's no convert button because the whole point of this tool is live, no-click conversion.

What bases can the custom base field convert?

Any base from 2 to 36. It uses the standard positional numeral system with digits 0-9 followed by letters A-Z, so base 16 behaves like hexadecimal, base 36 uses every digit and letter, and anything in between (like base 20 or base 32) works the same way. Change the base number and the field instantly redisplays the current value in that base.

What is two's complement and how does the bit-width selector work?

Two's complement is the standard way computers represent signed (positive and negative) integers in binary. Choosing a bit width sets the valid range: 8-bit spans -128 to 127, 16-bit spans -32,768 to 32,767, and 32-bit spans -2,147,483,648 to 2,147,483,647. Type a signed decimal number, its two's complement binary pattern, or its hexadecimal equivalent into any of the three fields and the other two update instantly for the selected bit width.