Forgly

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal.

Try an example:
Binary (2)
11111111
Octal (8)
377
Decimal (10)
255
Hexadecimal (16)
ff

Number bases explained

  • Binary (base 2) — digits 0 and 1; how computers store data.
  • Octal (base 8) — digits 0–7; used in Unix file permissions.
  • Decimal (base 10) — the everyday number system.
  • Hexadecimal (base 16) — digits 0–9 and A–F; common for colors, memory addresses, and byte values.

Why programmers convert bases

Low-level programming, debugging, networking, and graphics all involve different bases. Hex is compact for representing bytes (two hex digits = one byte), binary shows individual bits, and octal appears in file permissions like chmod 755. Quick conversion between them is a everyday need.

How to use this tool

Enter a value, pick the base it's currently in, and the converter shows the equivalent in all four bases. Invalid digits for the chosen base are flagged.

Is my data safe?

All conversion happens in your browser.

Common base conversions

Frequently asked questions

How do I convert decimal to binary or hex?

Enter your number, choose the base it's currently in, and the converter instantly shows the equivalent value in binary, octal, decimal, and hexadecimal.

What numbers can it convert?

It converts whole numbers across base 2, 8, 10, and 16. Digits that are not valid for the chosen base are flagged.

Is it free and private?

Yes — it's free and all conversion happens in your browser.