Skip to content

Number Base Converter

Convert between binary, octal, decimal and hex.

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

Multiply each digit by 16 raised to its position, counting from 0 on the right, and add them up. For 1F: 1 × 16 + 15 × 1 = 31. The letters A to F stand for 10 to 15.

One hex digit is exactly four bits, so a byte is always two hex digits (00 to FF). That makes hex a compact, readable way to write memory addresses, colors, hashes and binary data.

No. Every tool runs in your browser, so your code, tokens, keys and files are processed on your device and are not sent to our server or stored. Reloading or closing the page clears them.

Yes. Every tool is free with no sign-up and no limits on use. Clearly labeled ads keep it that way.

Yes. The tools work in any modern browser on phones, tablets and computers, though large files and long code are easier to handle on a computer.