belun.app Blog

Number Base Converter — Binary, Octal, Decimal, Hex Online

Type a value in any field — the other three update instantly.

Type any value into the binary, octal, decimal, or hexadecimal field — all other representations update instantly as you type. Works entirely in your browser with no server involved. Useful for programming, debugging bit fields, reading memory addresses, or understanding how computers represent numbers.

How it works

  1. 1
    Type a value in any field Enter a number into whichever base you already know — binary (0s and 1s), octal (0–7), decimal (0–9), or hexadecimal (0–9, A–F). The other three fields update automatically.
  2. 2
    Read the converted values Each field shows the same number expressed in its own base: base 2 for binary, base 8 for octal, base 10 for decimal, and base 16 for hex. Hex letters are shown in uppercase.
  3. 3
    Copy a result Click the Copy button next to any field to copy that representation to your clipboard, ready to paste into code, a terminal, or documentation.

Your data stays private

All processing happens entirely in your browser. No files, text, or data are ever sent to our servers. You can disconnect from the internet and this tool will still work.

Frequently asked questions

What is base conversion?
Base conversion translates a number from one positional numeral system to another. The underlying value is identical — only its written form changes. For example, 13 in decimal equals D in hexadecimal and 1101 in binary.
Why do developers use hexadecimal?
Hex packs four binary bits into a single character, making long binary strings far shorter to read and write. One byte (8 bits) fits in exactly two hex digits, which is why memory addresses, CSS color codes, and hash outputs are all written in hex.
What numbers can this tool handle?
The tool uses JavaScript's standard number type, which handles integers accurately up to 2^53 − 1 (9,007,199,254,740,991 in decimal). For typical programming tasks — port numbers, flags, color values, small memory offsets — this range is more than enough.
Can I convert negative numbers?
Negative integers are not supported here. In practice, signed values are usually represented as two's complement, which depends on word size (8-bit, 16-bit, 32-bit). The tool focuses on non-negative whole numbers.
What does the 0x prefix in hex literals mean?
The 0x prefix is a convention from C and most languages that descend from it. It marks the following digits as hexadecimal. So 0xFF means 255 in decimal. This tool accepts hex values with or without the prefix — just the digits are fine.

From the blog

Binary, Octal, Decimal, and Hex: A Developer's Guide to Number Bases Why computers use binary and hex, how to convert between number bases, and when each system shows up in real-world code. Read the post →

Related tools