All tools run in your browser — your files never leave your device.
All tools154

Utilities & Converters

Number Base Converter

Binary, octal, decimal, hex and text in one view.

What it does. A number base is just how many symbols are used before rolling over. Decimal uses ten, binary two, hexadecimal sixteen. The value does not change — 255, 0xFF and 11111111 are the same number written three ways.
Runs in your browserNothing uploadsNo signupWorks offline

How to use Number Base Converter

  1. Type in any field and the others update.
  2. Use the text field to convert characters to their codes.
  3. Set a custom base from 2 to 36.

Why hexadecimal exists

Because one hex digit is exactly four binary digits, so any byte is exactly two hex characters. That makes hex a compact, lossless shorthand for binary that humans can read.

Decimal has no such relationship — 200 in decimal tells you nothing about the bit pattern, while 0xC8 tells you immediately it is 1100 1000.

That is also why colours are hex. #FF8800 is three bytes: red at maximum, green at 0x88, blue at zero. Written in decimal as 255, 136, 0 it carries the same information and is harder to reason about in a bitmask.

Octal, and why a leading zero is dangerous

Octal groups three bits per digit and survives mainly in Unix file permissions, where 755 and 644 are octal.

In several languages a leading zero means octal, so 010 is 8 rather than 10. This has caused real bugs in configuration values, dates and version numbers.

JavaScript removed the behaviour in strict mode and modern syntax uses 0o as an explicit prefix, but YAML and some parsers still do it. Never write a decimal number with a leading zero in code.

Text is numbers

Characters are stored as numbers. ASCII covers 0–127, where "A" is 65 and "a" is 97 — a difference of exactly 32, which is a single bit, which is why case conversion used to be a bitwise operation.

Unicode extends this to well over a million code points, encoded in UTF-8 as one to four bytes.

UTF-8 is why a "character count" and a "byte count" differ. An emoji is commonly four bytes and one code point, and some are several code points joined — which is why string length in bytes, code points and visible characters are three different numbers.

Frequently asked questions

Why is hexadecimal used instead of decimal?

Because one hex digit is exactly four bits, so a byte is exactly two hex characters. It is a compact, lossless shorthand for the bit pattern; decimal hides it.

Why do file permissions use octal?

Because permissions come in groups of three bits — read, write, execute — and one octal digit is exactly three bits. So 755 maps directly onto the bit pattern.

Why is 010 sometimes 8?

A leading zero means octal in several languages and parsers. It has caused real bugs in version numbers and dates. Never write a decimal number with a leading zero in code.

What is the difference between ASCII and Unicode?

ASCII covers 0–127. Unicode covers over a million code points and is usually encoded as UTF-8, using one to four bytes per character — which is why byte count and character count differ.

Why is "A" 65 and "a" 97?

They differ by exactly 32, which is a single bit. Case conversion in ASCII was therefore a bitwise operation, which is why the values were chosen that way.