BigInt for large numbers.
Use Cases
- Programming and debugging - Convert between hex, decimal, and binary
- Network engineering - Convert IP addresses and subnet masks
- Color codes - Convert hex color codes to RGB decimal values
- Bit manipulation - Work with binary representations
- Memory addresses - Convert between hex and decimal addresses
- Low-level programming - Octal file permissions, bitmasks
How It Works
The tool accepts a number in any base (2-36) and displays its equivalent in binary, octal, decimal, and hexadecimal:- Input format:
value|base(e.g.,FF|16for hex,1010|2for binary) - Default base: If no base is specified, assumes decimal (base 10)
- Output: Shows conversions to binary, octal, decimal, and hex
The tool uses BigInt for arbitrary precision, so it can handle very large numbers (thousands of digits) without loss of precision.
Input Format
Format:number|base
number: The numeric value (using digits valid for the specified base)base: The base/radix (2-36)- If base is omitted, assumes base 10
Valid Digit Ranges by Base
| Base | Valid Digits | Example |
|---|---|---|
| 2 (Binary) | 0-1 | 1010 |
| 8 (Octal) | 0-7 | 755 |
| 10 (Decimal) | 0-9 | 255 |
| 16 (Hex) | 0-9, A-F | FF (case-insensitive) |
| 36 (Max) | 0-9, A-Z | Z = 35 |
Output Format
Always shows four representations:Examples
Technical Details
Located in
lib/tools/engine.ts:506-518Supported Bases
- Range: 2 to 36
- Digits:
- 0-9: Values 0-9
- A-Z: Values 10-35 (case-insensitive)
Negative Numbers
Negative numbers are supported:Binary Padding
Binary output is padded to 8 bits (1 byte) minimum:Common Use Cases
RGB Color Codes
Convert hex color codes to decimal RGB values:Unix File Permissions
Convert octal permissions to binary/decimal:Memory Addresses (Hex to Decimal)
Subnet Masks
Convert CIDR notation to binary:Advanced Examples
Error Handling
Common Errors
| Error | Cause | Fix |
|---|---|---|
| Invalid digit ‘2’ for base 2 | Used digit outside base range | Use only 0-1 for binary |
| Invalid digit ‘G’ for base 16 | Hex only uses 0-F | Use A-F (G is invalid) |
| Base must be between 2 and 36 | Invalid base specified | Use base 2-36 |
Tips and Tricks
Quick Hex to Decimal
Powers of 2 (Binary)
Octal Shortcuts
Related Tools
- Color Converter - Convert hex/RGB/HSL color formats
- Hex to ASCII - Convert hex bytes to ASCII text
- ASCII to Hex - Convert ASCII text to hex bytes
- Hash Generator - Generate hashes (outputs in hex)