Number Base Converter

Convert between binary, octal, decimal, and hexadecimal

Input

Conversion Result

BINBinary
-
OCTOctal
-
DECDecimal
-
HEXHexadecimal
-

Quick Examples

Base Reference Table

DecimalBinaryOctalHexadecimal
0000
1111
21022
81000108
10101012A
15111117F
16100002010
25511111111377FF

Features

Professional number base conversion tool

Four Base Support

Supports conversion between binary, octal, decimal, and hexadecimal

Instant Conversion

Convert as you type, real-time display of all base results

Formatted Display

Binary automatically grouped every 4 bits for easy reading and verification

Input Validation

Automatically validates input against selected base rules

Quick Examples

Built-in common value examples, one-click fill for quick experience

Privacy & Security

All calculations done locally in browser, no network requests needed

Frequently Asked Questions

Common questions about number base conversion

What is a number base? What are the common bases?
Number base is a radix counting system. Common bases include: Binary (Binary): Used at computer low level, only 0 and 1. Octal (Octal): Uses 0-7, commonly used for Unix file permissions. Decimal (Decimal): Daily use, 0-9. Hexadecimal (Hex): 0-9 and A-F, commonly used for color values, memory addresses.
What do A-F in hexadecimal represent?
Hexadecimal needs 16 symbols, but numbers only have 0-9 (10 total), so letters are used: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15. Case insensitive, e.g., 0xFF and 0xff are the same, both represent decimal 255.
Why do programmers like hexadecimal?
Because hexadecimal and binary conversion is convenient: each hexadecimal digit corresponds to exactly 4 binary bits. For example: 0xF = 1111, 0xFF = 1111 1111 = 255. This makes hexadecimal very suitable for representing bytes (8 bits) and memory addresses, more readable than long binary strings.
What do prefixes 0x, 0b, 0o mean?
These are prefixes in programming languages to represent different bases: 0x or 0X: Hexadecimal, e.g., 0xFF = 255. 0b or 0B: Binary, e.g., 0b1111 = 15. 0o or 0O: Octal, e.g., 0o17 = 15. You can include these prefixes when inputting, the tool will automatically recognize and remove them.
How large numbers are supported?
This tool uses JavaScript's Number type, which can accurately handle 53-bit integers (about 9007 trillion). For larger numbers, precision loss may occur. For very large integers, it is recommended to use professional big number calculation tools.