Features
Six supported bases
Convert between:- Binary (Base 2) - Uses digits 0-1
- Octal (Base 8) - Uses digits 0-7
- Decimal (Base 10) - Standard base with digits 0-9
- Hexadecimal (Base 16) - Uses digits 0-9 and letters A-F
- Base32 - Uses A-Z and 2-7 (RFC 4648 alphabet)
- Base64 - Uses A-Z, a-z, 0-9, +, / alphabet
Large number support
The utility uses BigInt internally, allowing you to convert numbers far beyond JavaScript’s standard number limits without precision loss.All representations view
After conversion, see your number in all six bases simultaneously with a convenient table that includes:- Base name badges
- Formatted values with prefixes (0b, 0x, 0o)
- Individual copy buttons for each representation
Prefix recognition
The converter automatically strips common prefixes:0bfor binary0ofor octal0xfor hexadecimal
Swap bases
Quickly swap the source and target bases to reverse your conversion direction.Built-in examples
Access common conversions:- Decimal 255 (maximum byte value)
- Binary 11111111
- Hexadecimal FF
- One million in decimal
- DEADBEEF (classic hex value)
Keyboard shortcuts
Work efficiently with shortcuts for:- Converting numbers
- Copying results
- Clearing fields
Use cases
Programming and debugging
Convert memory addresses, bit flags, or color values:Network addressing
Convert IP address components or subnet masks between decimal and hexadecimal.Color codes
Convert RGB decimal values to hexadecimal for CSS:Data encoding
Convert numerical identifiers to Base32 or Base64 for compact representation.Learning computer science
Understand how different numeral systems represent the same value.Base32 and Base64 representations use character alphabets rather than pure numerical notation, making them suitable for encoding in text-based systems.
How it works
The conversion process:- Input validation - Checks that your input matches the expected character set for the source base
- Parse to BigInt - Converts the input to a BigInt decimal value
- Convert to target base - Transforms the BigInt to the target base representation
- Generate all bases - Computes representations in all six bases for the reference table
- Uses JavaScript’s built-in
toString(radix)method - Hexadecimal output is uppercase
- Uses RFC 4648 alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ234567
- Converts by repeatedly dividing by 32
- Uses standard alphabet: A-Z, a-z, 0-9, +, /
- Converts by repeatedly dividing by 64
Error handling
The utility validates input and shows descriptive errors:- “Invalid Binary value. Base 2 (0-1)” for incorrect binary digits
- “Invalid Hexadecimal value. Base 16 (0-9, A-F)” for invalid hex characters
- “Please enter a value to convert” for empty input
Related tools
- Base64 encoder - For text encoding (different from numerical Base64)
- Color converter - For converting color values between hex, RGB, and HSL