Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal. Accepts 0x, 0b and 0o prefixes.
About this tool
Binary, octal, decimal and hexadecimal number systems are fundamental in programming, electronics and computer architecture. This converter transforms any number between the four bases instantly, showing all four results at once. It accepts common prefixes like 0x (hexadecimal), 0b (binary) and 0o (octal), plus thousands separators with spaces or underscores. It uses arbitrary-precision arithmetic (BigInt), so it handles numbers larger than JavaScript's safe integer limit without losing accuracy. All computation happens in your browser with no data sent to servers.
About this tool
Binary, octal, decimal and hexadecimal number systems are fundamental in programming, electronics and computer architecture. This converter transforms any number between the four bases instantly, showing all four results at once. It accepts common prefixes like 0x (hexadecimal), 0b (binary) and 0o (octal), plus thousands separators with spaces or underscores. It uses arbitrary-precision arithmetic (BigInt), so it handles numbers larger than JavaScript's safe integer limit without losing accuracy. All computation happens in your browser with no data sent to servers.
Use cases
- Convert hexadecimal color values or memory addresses to decimal
- Interpret bit masks and binary flags when debugging code
- Work with octal permissions and codes on Unix systems
- Verify conversions for computer architecture exercises
Frequently asked questions
- Which number bases does the converter support?
- Binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). When you type a valid number you see all four representations at once, with your source base card highlighted.
- Can I type prefixes like 0x, 0b or 0o?
- Yes. The 0x (hex), 0b (binary) and 0o (octal) prefixes are accepted and stripped before conversion. Digit interpretation is defined by the selected source base.
- What is the largest number I can convert?
- There is no practical limit: the converter uses BigInt (arbitrary precision), so it handles values far beyond Number.MAX_SAFE_INTEGER without losing accuracy.
- Why is the hexadecimal result shown in uppercase?
- By convention, hexadecimal values are displayed in uppercase (FF, DEADBEEF). The input accepts both uppercase and lowercase letters interchangeably.
Related tools
UUID Generator
Generate universally unique identifiers (UUID v4) for your projects.
Password Generator
Create secure and random passwords customizable to your needs.
Timestamp Converter
Convert between Unix timestamps and readable dates. Useful for debugging and log analysis.
Color Converter
Convert colors between HEX, RGB, HSL and OKLCH with preview and WCAG contrast analysis.