🔢 Online Number Base Converter

Ad Space - Top (728×90)

🔄 Base Conversion

BIN
OCT
DEC
HEX

⚙️ Custom Base Conversion

🔤 ASCII Code Reference (0-127)

🔧 Bitwise Operations

🎨 Color Code Converter

Color Preview
Ad Space - Middle (728×90)

📊 Quick Reference Table

DecimalBinaryOctalHexadecimal

How to Use

This number base converter supports real-time conversion between binary, octal, decimal, hexadecimal, and any custom base (2-36). Here is a detailed guide on how to use it:

Basic Base Conversion: Enter a value in any input field, and the corresponding values in all other bases will be calculated and displayed in real time. For example, entering 255 in the "Decimal" field immediately shows 11111111 in "Binary", ff in "Hexadecimal", and 377 in "Octal". Each input field is labeled with its base on the right for easy identification.

Custom Base: In the "Custom Base Conversion" section, set the source and target bases (between 2 and 36), then enter a value to convert. Custom bases use 0-9 and a-z as digit symbols—for example, in base 36, z represents 35. Input is case-insensitive; output defaults to lowercase letters.

Bitwise Operations: Enter two decimal numbers in the bitwise section, select an operator (AND, OR, XOR, NOT, left shift <<, or right shift >>), and the tool will calculate the result and visualize each bit of the binary representation. NOT only operates on number A.

Color & ASCII: The color code converter supports conversion between hexadecimal colors (e.g., #06b6d4) and RGB values. The ASCII code reference table lists characters 0-127 for quick lookup. The quick reference table shows common numbers across the four standard bases, useful for learning.

Use Cases

Number base conversion is a fundamental skill in computer science and software development. Here are a few core application scenarios:

Programming & Debugging: Developers often switch between binary, decimal, and hexadecimal in low-level programming. Debugging memory addresses, reading register values, and analyzing binary protocols all frequently use hexadecimal. Bitwise operations are widely used in permission control (e.g., Linux file permissions like 755), flag management, and data compression.

Networking & Security: Network protocols express IP addresses, port numbers, and MAC addresses in different bases. Cryptographic keys and hashes are usually presented in hexadecimal. Color codes (like #FF6600) are essentially RGB values in hexadecimal, frequently used in front-end development and design.

Embedded & Hardware: In embedded development, register configuration, bit masking, and sensor data parsing all rely on base conversion and bitwise operations. Engineers need to convert binary configurations from hardware manuals into readable decimal or hexadecimal values before writing them to registers.

Background Knowledge

The Nature of Number Bases: A number base (radix) is the number of distinct symbols used in a counting system. Decimal uses 0-9 (10 symbols), originating from humans having ten fingers. Binary uses only 0 and 1, reflecting the two-state nature of electronic components and forming the foundation of computing. Hexadecimal was introduced to make binary data more compact and readable—every 4 binary bits correspond to exactly 1 hexadecimal digit.

Why Base 36? This tool supports up to base 36 because the digits 0-9 (10 symbols) plus letters a-z (26 symbols) total 36, which is the largest base that can be represented with single characters. Bases higher than 36 would require additional symbols (such as uppercase letters or special characters), which are rarely used in practice.

BigInt and Precision: JavaScript's native Number type can only safely represent integers up to 2^53-1 (about 9 quadrillion). Beyond that, precision is lost. This tool is implemented with BigInt, which can handle integers of arbitrary length, far exceeding the limits of ordinary calculators. However, bitwise NOT and shift operations are still subject to JavaScript's 32-bit bitwise operation limits.

❓ Frequently Asked Questions

What number bases are supported?

Supports binary (Base 2), octal (Base 8), decimal (Base 10), hexadecimal (Base 16), and any custom base (2-36). Custom bases use digits 0-9 and letters a-z as symbols—for example, base 36 uses all 36 characters from 0-9 and a-z.

How large of numbers can it convert?

This tool is implemented with JavaScript BigInt, supporting arbitrary-precision integer conversion. It can theoretically handle integers with millions of digits, far exceeding the limits of ordinary calculators. Note that very large numbers may have performance limitations in certain bitwise operations.

How does the bitwise operation feature work?

Enter two decimal numbers in the bitwise section, select an operator (AND, OR, XOR, NOT, left shift, or right shift), and the tool will display the result along with a binary visualization of each bit. NOT only operates on number A.

How do I convert a hexadecimal color to RGB?

In the color code converter section, enter a hexadecimal color value (e.g., #06b6d4) and the RGB value will be calculated automatically. Likewise, entering an RGB value (such as rgb(6, 182, 212) or 6,182,212) will convert it to hexadecimal.

Are letters in custom bases case-sensitive?

No. In custom base conversion, uppercase and lowercase letters are both recognized. Output results default to lowercase letters to follow programming conventions.

Is my data secure?

Completely. This tool runs entirely in your browser—no data is ever uploaded to a server. It works even when you are offline.

📖 Feature Guide

Supported Number Bases

Binary (Base 2): Uses only 0 and 1, the most fundamental number representation in computing.

Octal (Base 8): Uses 0-7, widely used in Unix/Linux file permissions (e.g., 755, 644).

Decimal (Base 10): The most commonly used base in daily life, using 0-9.

Hexadecimal (Base 16): Uses 0-9 and a-f, very common in programming, color codes, and memory addresses.

Custom Base (2-36): Supports conversion between any bases from 2 to 36, using 0-9 and a-z as digit symbols.

Bitwise Visualization

AND: Result is 1 only if both corresponding bits are 1.

OR: Result is 1 if at least one corresponding bit is 1.

XOR: Result is 1 if the corresponding bits are different.

NOT: Flips all bits—1 becomes 0, and 0 becomes 1.

Left/Right Shift: Shifts all bits left or right by the specified number of positions.

ASCII Code Reference

Displays all ASCII characters from 0 to 127 with their decimal and hexadecimal values, including both printable and control characters, for quick lookup during programming and debugging.

Ad Space - Bottom (728×90)