How to convert number bases online free

The number 255 and the number FF are the same number — written in two different bases. Computers count in binary, programmers write in hexadecimal, and file permissions still use octal, so sooner or later you need to move a value between them. This guide explains how each base works, how to convert by hand, and when to let a free converter do it for you.

What a number base actually is

A base is simply how many different digits a counting system uses before it carries over to the next place. Decimal, the system you use every day, has ten digits (0–9): once you pass 9, you carry one into the tens place. Other bases work exactly the same way, just with a different number of digits — and once you see that, every base becomes the same idea with different symbols.

Binary (base 2): the language of computers

Binary uses only two digits, 0 and 1, because a wire in a computer is either on or off — there is no third state to work with. Each place is worth twice the one before it: 1, 2, 4, 8, 16, 32, and so on. The binary number 1010 is 8 + 0 + 2 + 0, which is 10 in decimal. It looks long and tedious to humans, but it is the only counting system a machine can do directly, and everything else in computing is built on top of it.

Decimal (base 10): the one you already know

Decimal uses ten digits because humans have ten fingers, and each place is worth ten times the one before it: ones, tens, hundreds, thousands. The number 255 means 2 hundreds, 5 tens and 5 ones. It feels natural only because it is the system you learned first — a computer finds it just as awkward as you find binary.

Hexadecimal (base 16): the programmer's shorthand

Hexadecimal, usually just called hex, uses sixteen digits: 0–9, then the letters A–F, where A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15. It exists for one practical reason: every hex digit stands for exactly four binary digits, so a long string of ones and zeros collapses to something a human can read. The binary value 11111111 is just FF in hex — two characters instead of eight. Programmers write hex with a 0x prefix (0xFF) and web colours with a # prefix (#FF0000), but the value is the same either way.

Octal (base 8): the older shorthand

Octal uses eight digits, 0–7, and each digit stands for exactly three binary digits. It was the standard shorthand before hex took over, and it still survives in one place almost everyone meets: Unix file permissions, where 755 means something very specific (more on that below). You will rarely need octal outside that, but a converter that covers all four bases saves you learning a second system for one job.

How to convert between bases

  1. Open the converter. Go to the Number Base Converter — it is free, needs no signup, and runs entirely in your browser.
  2. Type the number in any one field. Binary, octal, decimal or hexadecimal — whichever form you already have. The other three fields update live with the same value.
  3. Copy the form you need. Each field has its own Copy button, so you can paste the result straight into code, a colour picker or a terminal.
  4. For a hand check, convert decimal to binary by dividing by 2. Take 13: 13 ÷ 2 is 6 remainder 1, 6 ÷ 2 is 3 remainder 0, 3 ÷ 2 is 1 remainder 1, 1 ÷ 2 is 0 remainder 1. Read the remainders from the bottom up — 1101 — and you have 13 in binary. Check it: 8 + 4 + 0 + 1 = 13.
  5. To go the other way, add the place values of the 1s. In 1101, the 1s sit in the 8, 4 and 1 places, so the value is 8 + 4 + 1 = 13. The same trick works in any base: multiply each digit by its place value and add them up.

Hand conversion is worth learning once, because it teaches you what the digits mean. After that, a converter is faster and safer — especially for long numbers, where one misread digit changes the whole value. Our converter uses arbitrary-precision integers, so very large numbers convert exactly instead of being rounded off the way floating-point maths would round them.

One number, four ways: 255

The number 255 is the best example to memorise, because it is the largest value one byte can hold — and bytes are everywhere. Here it is in all four bases:

Another useful one is 42: binary 101010, octal 52, hex 2A. Check the hex: 2 × 16 + 10 = 42. Once you can do 255 and 42 in your head, you have the pattern — every other number is the same steps with different digits.

Where each base shows up in real life

Colours on the web

Every colour on a website is three hex numbers stuck together: #FF5733 means red FF (255), green 57 (5 × 16 + 7 = 87) and blue 33 (3 × 16 + 3 = 51). That is why colour pickers show hex codes — two hex digits per channel is the most compact way to write a colour, and converting a hex code to decimal tells you exactly how much of each channel is in it. Our hex to RGB guide walks through the same conversion for colours specifically.

File permissions

If you have ever typed chmod 755 on a server, you have used octal. Each digit is three permission bits: 7 is 111 (read, write, execute), 5 is 101 (read, execute, no write). So 755 gives the owner full control and everyone else read and execute — written as three octal digits instead of nine binary ones. The chmod command still takes octal because the mapping is so clean.

Memory addresses and error codes

Debuggers, crash logs and hardware manuals print addresses in hex — 0x7FFF5FBFF8A0 and the like — because a 64-bit address in binary would be 64 characters long and unreadable. Error codes work the same way: 0x80070005 is far easier to search for and quote than its 32-digit binary form. When you see a long string of hex digits in a log, it is almost always an address or an identifier, not a number anyone is meant to calculate with.

Mistakes that catch everyone out

The letter O is not a zero

Octal uses the digits 0–7, so the digit 8 never appears in it — and the letter O never appears in any number. If a value contains an 8 or a 9, it cannot be octal; if it contains a letter past F, it cannot be hex. The converter flags invalid digits for the base you typed, which is the fastest way to catch a typo before it becomes a wrong value in your code.

Hex letters are values, not labels

Beginners often treat A–F as labels and forget they are numbers: A is 10, not "the first letter". That matters in the maths — 1A is 1 × 16 + 10 = 26, not 1 × 16 + 1. Uppercase and lowercase mean the same thing (ff and FF are identical), so use whichever your codebase prefers and stay consistent.

Leading zeros change nothing — except in code

In pure maths, 00101 and 101 are the same binary number; leading zeros are just padding. In some programming languages, though, a leading 0 marks a number as octal — in C and older JavaScript, 010 means 8, not 10. If a number in code behaves strangely, check for a stray leading zero before anything else.

One last habit worth keeping: always say which base a number is in when you share it. "255" is clear enough, but "FF" without context could be hex, a typo, or two letters — a 0x prefix or a word like "hex" removes the doubt in four characters.

Related guides

Questions people ask

What is the easiest way to convert binary to decimal?

Add up the place values of the 1s. In 1010, the 1s sit in the 8 and 2 places, so the value is 8 + 2 = 10. For anything longer than a few digits, type the number into the Number Base Converter and read the decimal field — it handles very large integers exactly, with no floating-point rounding.

What does FF mean in hexadecimal?

F is the hex digit for 15, so FF means 15 × 16 + 15 = 255. It is the largest value one byte can hold, which is why FF shows up constantly — full red in a colour code, 255 in a mask, the top of an 8-bit range.

Why do programmers use hexadecimal instead of binary?

Because it is four times shorter: every hex digit stands for exactly four binary digits, so a 32-bit value needs 8 hex characters instead of 32 ones and zeros. It is far easier to read, copy and spot mistakes in, while still mapping cleanly onto the binary underneath.

Is this number base converter free, and does it need a signup?

Yes, it is free and needs no signup. Type a number in any one of the four fields and the other three update live in your browser — nothing is uploaded, and negative numbers work with a leading minus sign.