DeveloperKit

Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any base up to 36, with two's complement and a bit editor. Free, private, and 100% in your browser.

Number in each base

Bits & Two's Complement

As unsigned 8-bit
255
As signed 8-bit
-1
8-bit hex
0xFF
Bit length · bytes
8 bits · 1 byte

Click a bit to flip it. Bit 7 is on the left.

As a Unicode code point: U+00FFÿ

Convert Between Number Bases

Developers move between number systems all the time: hex in memory dumps and color codes, binary in bit flags and permissions, octal in Unix file modes, and decimal everywhere else. Enter a number in any base to see it in all of them.

The same number in four bases
Decimal       255
Hexadecimal   0xFF
Binary        0b1111_1111
Octal         0o377

Features

  • Edit any base

    Type in the decimal, hex, binary, octal, or custom-base field and the others update as you type.

  • No size limit

    Uses arbitrary-precision integers (BigInt), so 64-bit, 128-bit, and even larger numbers convert exactly.

  • Two's complement

    See negative numbers as 8, 16, 32, 64, or 128-bit patterns, and read any bit pattern as signed or unsigned.

  • Bit editor

    Click individual bits to flip them, which is handy for flags, masks, and register values.

  • Forgiving input

    Accepts 0x, 0b, and 0o prefixes, # for hex, and digit separators like 1111_0000 or 1,000,000.

  • Any base up to 36

    Convert to base 3, base 32, base 36, or any other base, using digits 0-9 and letters a-z.

How to Convert a Number

  1. Type a number into the field of its base: decimal, hex, binary, octal, or a custom base.
  2. Read the result in every other base; copy any of them with a prefix.
  3. Choose a bit width to see the two's complement form and signed and unsigned values.
  4. Click bits in the bit editor to flip them.

Frequently Asked Questions

How do I convert binary to decimal?

Multiply each bit by 2 raised to its position, counting from 0 on the right, and add the results. For 1011: 1×8 + 0×4 + 1×2 + 1×1 = 11. Type the number in the Binary field to see it instantly.

Why is hexadecimal used in programming?

Each hex digit is exactly four bits, so a byte is always two hex digits (00-FF). That makes hex a compact, readable way to write memory addresses, colors (#FF8800), byte values, and bit masks.

What is two's complement?

It is how computers store negative integers: invert all bits of the positive value and add 1. In 8 bits, -1 is 11111111 (0xFF) and -128 is 10000000. The same bit pattern can be read as signed or unsigned, which the tool shows side by side.

Can I convert fractions or floating-point numbers?

No, this tool converts integers. Floating-point values use a separate encoding (IEEE 754) with a sign, exponent, and mantissa.

  • Unix Timestamp Converter

    Convert Unix epoch timestamps in seconds, milliseconds, or nanoseconds to dates in any time zone, and dates back to timestamps.

  • Time Zone Converter

    Compare the time in UTC and cities around the world side by side, with a 24-hour timeline and daylight saving info.

  • JSON Formatter

    Beautify, minify, and validate JSON instantly with exact line and column error reporting.

  • JSON Comparer

    Compare two JSON documents side by side and see every added, removed, and changed value.