Number Base Converter (Binary, Hex, Decimal, Octal)

Developer Tools

Type a number in binary, octal, decimal, hex or any base up to 36, and see it in all the others at once.

Type in any box; the others update as you type.
Options
Binarybase 2
Octalbase 8
Decimalbase 10
Hexadecimalbase 16
Base 360–9 and a–z
8-bit value8-bit two's complement: 1111 1111
Binary to decimal, step by step

11111111 = 2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

Processed in your browser. A copy of each run is saved to your past runs so you can reopen it. Privacy

About

What the Number Base Converter does

The Number Base Converter keeps binary, octal, decimal, hexadecimal and one more base of your choice in sync: type in any box and the others update. Numbers can be any size, well beyond 64 bits. The page shows the value's two's complement pattern at 8, 16, 32 or 64 bits, groups digits for readability, and writes out the binary-to-decimal working for values up to 65,535.

Steps

How to use it

  1. 1Type a number into any box: binary, octal, decimal, hex or the extra base.
  2. 2Read the same number in every other base as you type.
  3. 3Copy any value, or check the two's complement and step-by-step working below.

Example

A real run

Input

255 in the Decimal box

Output

Binary       11111111
Octal        377
Decimal      255
Hexadecimal  FF

11111111 = 2^7 + 2^6 + 2^5 + 2^4 + 2^3 + 2^2 + 2^1 + 2^0 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

255 is the largest one-byte value: all eight bits set, FF in hex and 377 in octal. The working line adds the powers of two for each 1 bit.

Options

Every setting, and when to use it

Any base from 2 to 36
The fifth box converts to bases such as 3, 12 or 36. Bases above 10 use letters for digits, so base 36 uses 0–9 and a–z, handy for short IDs.
Two's complement width
Shows how a value is stored as a signed integer of 8, 16, 32 or 64 bits, so -1 at 8 bits is 11111111. Values that do not fit say so.
Group digits and uppercase hex
Groups binary and hex in fours (1111 1111) and decimal with commas. Copy removes the grouping. Uppercase hex matches most documentation.

Good to know

Common problems and limits

Integers only, positive or negative, up to 4,096 digits; fractions such as 0.1 in binary are not converted.

Prefixes such as 0x, 0b and 0o and spaces, commas and underscores in the input are ignored.

To turn text into binary or hex bytes rather than numbers, use the Binary Translator or Hex to Text.

Audience

Who uses it

  • StudentsCheck computer science homework on binary, octal and hex, with the positional working for binary to decimal.
  • DevelopersConvert flags, bitmasks, permissions and memory addresses, and see how negative numbers are stored.
  • Designers and front-end developersTurn a hex color channel such as CC into 204, or use the Color Converter for whole colors.

FAQ

Frequently asked

How do I convert binary to decimal by hand?

Write the powers of two under the bits from the right, 1, 2, 4, 8 and so on, then add the powers where the bit is 1. For 1011 that is 8 + 0 + 2 + 1 = 11. The working box shows this for every value up to 65,535.

How do I convert hex to decimal?

Multiply each hex digit by 16 raised to its position from the right and add them, with A to F meaning 10 to 15. FF is 15 × 16 + 15 = 255. Typing FF in the Hexadecimal box gives the same answer instantly.

What is 11111111 in decimal?

255: eight 1 bits add up to 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1. It is the largest value one byte can hold, which is why 255 appears in IP addresses and color values.

What is two's complement?

The way almost all computers store negative integers. To negate a number, flip every bit and add 1, so -1 becomes all ones. The same adding circuit then works for positive and negative numbers. The status line shows the pattern at the width you choose.

Why is hex used for colors and memory?

One hex digit is exactly four bits, so two digits make one byte. That makes hex a compact way to write bytes: a color #6D28D9 is three bytes (109, 40, 217), and memory addresses line up with hex digits.

Is my number sent anywhere?

No. Conversion uses your browser's BigInt arithmetic. A copy of each conversion is saved to your past runs so you can reopen it.

Automation: an MCP tool convert_base(value, from, to) → value and an n8n node are planned for this tool.

GuideEncoding vs hashing vs encryption, with examples →Encoding changes the format, hashing makes a fingerprint, encryption hides data behind a key. Worked examples with Base64, SHA-256, HMAC, TOTP and UUIDs.
Built and maintained by Radhika SinghLast updated Questions: hello@operativez.ai