Convert Numbers Between Different Number Bases
A fast and accurate tool for converting numbers between binary, octal, decimal, hexadecimal, and Base32 formats. Essential for developers, programmers, and anyone working with different number systems.
The Number Base Converter is a straightforward tool for converting numbers between different bases. Whether you're working on low-level programming, debugging, or learning about number systems, this tool provides instant conversions across five common bases.
Tip: The tool validates your input in real-time and shows an error message if you enter an invalid number for the selected base.
The tool supports five commonly used number bases, each with its own applications and use cases:
Uses only 0 and 1. Fundamental to all computing and digital systems. Each digit represents a bit (binary digit).
Valid characters: 0, 1
Uses digits 0-7. Historically used in computing as a more compact representation of binary (3 bits per octal digit).
Valid characters: 0-7
The standard number system humans use daily. Uses digits 0-9. Ideal for entering familiar numbers.
Valid characters: 0-9
Uses digits 0-9 and letters A-F. Widely used in programming, web development (colors, CSS), and low-level system work.
Valid characters: 0-9, A-F (case-insensitive)
Uses 32 characters (typically A-Z and 2-7). Commonly used in encoding schemes like RFC 4648 for representing binary data in a text format that's easy to type and share.
Valid characters: A-Z, 2-7
The Number Base Converter features a simple, intuitive interface designed for quick conversions:
Choose the base of your input number from the dropdown menu. The converter will validate your input against the selected base.
Type or paste your number into the input field. The tool converts in real-time as you type, showing results instantly.
The converted values for all supported bases appear on the right side. Each result can be copied individually.
Click the copy button next to any result to copy it to your clipboard. A confirmation indicator appears briefly.
Note: If you enter an invalid character for the selected base, an error message will appear explaining the issue.
The tool uses a responsive two-column layout that adapts to different screen sizes:
Contains the base selector dropdown and number input field. This is where you specify what number to convert and its format.
Displays converted values for all five bases. Each result shows the base name and value with a copy button for quick access.
Sample button loads a demo value (255), and Clear resets the input and all results.
Invalid inputs show an error alert with a descriptive message explaining what's wrong.
The Number Base Converter includes several features to make number conversion efficient and error-free:
Conversions happen instantly as you type. No need to click a convert button - see results immediately.
Copy any converted value with a single click. Each result has its own dedicated copy button.
The tool validates your input and shows clear error messages for invalid characters or formats.
Load example values with one click to see how the tool works and test different scenarios.
Here are some common conversion examples to illustrate how the tool works:
Decimal (10): 255
Binary (2): 11111111
Octal (8): 377
Hexadecimal (16): FF
Base32 (32): 7S
Binary (2): 1010
Octal (8): 12
Decimal (10): 10
Hexadecimal (16): A
Base32 (32): A
Hexadecimal (16): 1A3F
Binary (2): 110100100111111
Octal (8): 150477
Decimal (10): 6719
Base32 (32): 23D7
Base32 (32): JBSWY3DPEHPK3PXP
Binary (2): 0100100001100101011011000110110001101111
Decimal (10): 478560413322
Hexadecimal (16): 48656C6C6F
Note: Base32 uses the RFC 4648 alphabet where A=0, B=1, ..., Z=9, and 2=26, 3=27, 4=28, 5=29, 6=30, 7=31.
The Number Base Converter is useful in various scenarios:
Convert between hex colors (CSS), memory addresses, binary flags, and other representations commonly used in code.
Quickly convert hexadecimal error codes or memory dumps to decimal for easier reading and debugging.
Learn how different number systems work and practice conversions between bases for computer science courses.
Work with encoded data in Base32 (common in API keys, TOTP codes) and convert to other formats for analysis.
Convert IP addresses, subnet masks, and port numbers between decimal and hexadecimal formats.
Handle Base32 encoded data from various sources and convert to binary or decimal for further processing.
Understanding how the conversions work internally:
The converter uses an intermediate decimal representation. When you input a number in any base, it's first converted to decimal, then the decimal value is converted to all other bases.
Base32 uses the RFC 4648 alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567". This is the standard alphabet used by many applications including Google Authenticator TOTP codes.
The tool handles JavaScript's safe integer range (Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER) for accurate conversions.
The tool automatically handles case-insensitive input for hexadecimal and Base32. Invalid characters are filtered out or flagged with an error message.
Warning: Very large numbers may lose precision due to JavaScript's number representation limits. For numbers beyond Number.MAX_SAFE_INTEGER (9,007,199,254,740,991), consider using specialized big integer libraries.