Converter Guides
Convert Number Bases Online — Hex, Binary, Octal & Decimal
Convert numbers instantly between Decimal (Base 10), Binary (Base 2), Hexadecimal (Base 16), and Octal (Base 8). Real-time browser conversion for developers and students.
NeedAnyToolPublished 3 min read

When debugging a network packet in Wireshark, setting Unix file permissions in Linux (chmod 755), or working with bitwise color masks in CSS (#FF5733), you are constantly jumping between four numbering systems: Decimal, Binary, Hexadecimal, and Octal.
Converting large numbers or bitmasks by hand with pencil and paper is tedious and prone to arithmetic mistakes.
Number Base Converter converts any number across all four primary computer bases simultaneously as you type, with zero page reloads.
The four core number systems explained
Every numbering system uses a base (radix) that defines how many unique digits it contains before rolling over to the next place value:
- Decimal (Base 10): Uses digits
0–9. The everyday human counting system based on ten fingers. - Binary (Base 2): Uses digits
0and1. The native language of digital electronics and transistors (off / on). - Hexadecimal (Base 16): Uses digits
0–9and lettersA–F(whereA=10throughF=15). Each hex character represents exactly 4 binary bits (a nibble), making it the cleanest way to write memory addresses, byte values, and color codes. - Octal (Base 8): Uses digits
0–7. Each octal character represents exactly 3 binary bits. Commonly used for POSIX/Linux file permissions.
Decimal: 42
Binary: 0010 1010
Hexadecimal: 2A (0x2A)
Octal: 52 (0o52)
Quick conversion reference table
| Decimal (Base 10) | Binary (Base 2) | Hexadecimal (Base 16) | Octal (Base 8) |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 5 | 0101 | 5 | 5 |
| 10 | 1010 | A | 12 |
| 15 | 1111 | F | 17 |
| 16 | 0001 0000 | 10 | 20 |
| 42 | 0010 1010 | 2A | 52 |
| 255 | 1111 1111 | FF | 377 |
| 1024 | 0100 0000 0000 | 400 | 2000 |
Practical use cases for number base conversion
1. Web colors and RGB values
A color like RGB (255, 87, 51) is three decimal byte values. Converting 255 -> FF, 87 -> 57, and 51 -> 33 gives you the CSS HEX code #FF5733. You can also convert full color models directly in our Color Converter.
2. Linux file permissions (chmod)
When you assign permissions like chmod 755 script.sh, you are using octal notation:
7=111binary (read + write + execute)5=101binary (read + execute)
3. Bitwise flags and masks
Engineers configure hardware registers and permissions using binary bitmasks (e.g. 0b00000100 for feature flag 3). Hexadecimal shorthand like 0x04 makes long 32-bit registers easy to read in code.
How to use the converter
- Open Number Base Converter.
- Type your number into whichever base field you already know (Decimal, Binary, Hex, or Octal).
- The remaining fields calculate instantly in real time.
- Click the copy icon next to any field to copy the formatted value to your clipboard.
If you are working with text or character codes instead of pure numbers, check out Text to Binary or Text to ASCII.
FAQ
Does the converter handle negative numbers or two's complement?
The converter handles positive standard integers and unsigned numeric values cleanly across all common bit lengths.
Are Hexadecimal letters case-sensitive?
No. You can type uppercase 2A or lowercase 2a — the tool parses both seamlessly.
Is the conversion done securely?
Yes. All computations execute directly inside your browser's local JavaScript environment. No numbers or code snippets leave your computer.
Related guides

Converter Guides
Convert Color Codes Online — HEX, RGB & HSL
Convert HEX, RGB, and HSL color codes in your browser. Free Color Converter for designers and CSS — NeedAnyTool.

Converter Guides
Convert CSV to JSON Online — Sheets to API Data
Convert CSV to JSON for APIs and apps. Free CSV to JSON converter in your browser — private NeedAnyTool tool.

Converter Guides
Convert JSON to CSV Online — Arrays to Spreadsheets
Turn JSON arrays into CSV for Excel or Sheets. Free JSON to CSV converter in your browser — private NeedAnyTool tool.