Skip to content

Number Base Converter

Convert between binary, octal, decimal and hex.

  • 100% Free
  • No Sign Up
  • Works in Your Browser

Number base converter

Binary, octal, decimal and hex

More Developer Tools

View all tools

Every everyday developer tool, right in your browser.

No installs. No uploads. No signup.

Browse all 36 tools
Developer tools
36
Cheat sheets
10
Bytes uploaded
0

How to use the number base converter

Three steps, all in your browser.

  1. 1

    Enter a number

    Type a number in binary, octal, decimal or hex.

  2. 2

    Check the options

    Adjust the options if you need to. The conversion updates instantly.

  3. 3

    Copy the result

    Copy the output in one click. Nothing is saved or sent anywhere.

Number Base Converter: what to know

The number base converter shows a number in binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) at once, and converts to or from any base between 2 and 36. Type in any of the fields and the others update. It uses JavaScript's BigInt, so very large integers convert exactly, without the rounding that ordinary numbers suffer above 2^53.

Each base is a positional system: the value of a digit is multiplied by the base raised to its position. Hexadecimal is popular in programming because one hex digit is exactly four bits, so a byte is two hex digits and a 32-bit value is eight. Octal maps to three bits per digit, which is why Unix file permissions (such as 755) are written in octal.

Bases above 10 use letters for digits: A is 10, F is 15 and Z is 35 in base 36. Base 36 is used for short IDs, since it packs digits and letters into a compact, case-insensitive string.

Popular uses

  • Converting hex values from memory dumps or debuggers
  • Reading binary flags and bit masks
  • Working out Unix permission numbers
  • Learning and checking computer science exercises

Tips for the best result

  • Prefixes such as 0x (hex), 0b (binary) and 0o (octal) are how many languages mark the base in code.
  • Group binary digits in fours to read them as hex: 1111 0000 is F0.
  • Negative numbers in code are usually stored in two's complement, which depends on the bit width.

Read how JustYourDev works and our privacy details. Code, data and files you use here are processed in your browser and are never sent to our server.

Frequently asked questions