Convert Number Bases

Type a number in binary, octal, decimal or hex and the other fields update at once. Large values such as 64-bit IDs and hashes stay exact.

  • Free
  • Runs in your browser
  • Bases 2 to 36
  • No sign-up
How it works

How It Works

Convert a number in three steps.

01

Type in any field

Binary, octal, decimal, hex or a base of your choice.

02

See all bases

The other fields update as you type.

03

Copy the one you need

Each field has its own copy button.

About

How do number bases work?

A base sets how many digits a number system has. Decimal uses ten (0-9), binary two (0 and 1), octal eight (0-7) and hexadecimal sixteen (0-9 then A-F). Computers store everything in binary; hex is a compact way to write it, because each hex digit is exactly four bits. That is why colors (#FF8800), memory addresses and byte dumps are written in hex.

Negative numbers are shown with a minus sign, not as two's complement. -1 is -1 in binary here, not 11111111, because two's complement depends on a fixed bit width.

Exact for big numbers

Uses arbitrary-precision integers, so 18446744073709551615 converts to FFFFFFFFFFFFFFFF exactly.

Prefixes and separators

0x, 0b and 0o prefixes are accepted, and spaces, commas and underscores between digits are ignored.

Digit grouping

Shows binary and hex in groups of four and decimal in groups of three.

Any base to 36

Base 36 uses 0-9 and A-Z and is sometimes used for short IDs.

Features

Why Use This Converter

Made for programmers and students.

Type anywhere

Every field is an input, so you can start from whichever base you have.

No precision loss

Unlike a basic calculator, large values never round.

Bit count

Shows how many bits the number needs, handy when choosing an integer type.

Private

Calculated in your browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the Number Base Converter.

Multiply each digit by 16 raised to its position, counting from 0 on the right, and add them up. 2F is 2 × 16 + 15 = 47. The tool does this for numbers of any length.