Base Converter
Free online base converter tool, binary to hexadecimal supported
About Base Converter
Converts a single integer between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Parsing uses JavaScript parseInt with the chosen radix, so it accepts any valid literal for that base. Results show raw digits plus a space-grouped formatted version for readability.
How to Use
1. Select the Input Base using the Binary / Octal / Decimal / Hexadecimal buttons (this also clears the input field). 2. Type the number in the chosen base. Invalid digits for the base show a red border and an error message. 3. The Conversions card updates live showing all four bases. 4. Click Copy next to any result row to copy the raw value.
Output Formatting
Binary is shown in 4-bit groups separated by spaces (e.g. 1111 1111) and hex in 2-digit byte groups (e.g. FF). Decimal additionally shows a locale-formatted thousands-separated value. Note the conversion uses parseInt, so it is limited to 53-bit safe integer precision; very large inputs may lose precision.
▶Why does a very long binary string give a wrong result?
▶Do I need to include the 0x or 0b prefix?
▶Does it support fractional or negative numbers?
▶Why does the input clear when I switch base?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee