Number Base Converter
Type a number in any base to see it in binary, octal, decimal and hexadecimal at once, plus a base of your choice up to 36. Arbitrary-precision integers mean even 100-digit numbers convert exactly.
738 bits · 3 decimal digits
About number bases
A base (or radix) is how many distinct digits a number system uses. Decimal uses 0–9; binary uses 0 and 1; octal uses 0–7; hexadecimal uses 0–9 and A–F, where A = 10 and F = 15. Bases above 16 continue through the alphabet up to Z = 35 (base 36).
In code, prefixes mark the base: 0b1010 (binary), 0o12 (octal) and 0xA (hex) all equal decimal 10. One hex digit is exactly 4 bits, so hex is a compact way to write binary.
Integers of any size are supported using arbitrary-precision BigInt arithmetic. Negative numbers keep their minus sign; for two's complement bit patterns use the Binary / Hex / Decimal converter.
How to convert between number bases
- Choose the base of your input, or type a prefix such as 0x, 0b or 0o.
- Enter the number. Spaces and underscores are ignored.
- Read the conversions to binary, octal, decimal and hex.
- Pick a custom base (2 to 36) for anything else.
Frequently asked questions
What do 0x, 0b and 0o mean?
Prefixes used in programming languages: 0x for hexadecimal (base 16), 0b for binary (base 2) and 0o for octal (base 8).
Are fractions supported?
No. This converter handles integers only, of any size. Fractional values often can't be represented exactly in other bases.
Related tools
- Binary / Hex / Decimal ConverterTwo's complement, bit widths and signed/unsigned views.
- Byte Size ConverterConvert between bytes, KB, MB, GB, KiB, MiB, GiB and more.
- Unix Timestamp ConverterConvert epoch seconds or milliseconds to dates and back.
More in Date & Conversion.