Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal, and any base from 2 to 36.
0b
0o
0x
Tip: Edit any field and all others will update automatically. Supports negative numbers.
Number Base Systems - Technical Details
Number bases define how many unique digits are used to represent values. Binary (base-2) uses 0-1, octal (base-8) uses 0-7, decimal (base-10) uses 0-9, and hexadecimal (base-16) uses 0-9 and A-F. Any base from 2 to 36 can be represented using digits and letters.
Command-line Alternative
# Convert in terminal (using printf)\nprintf '%d\\n' 0xFF # Hex to decimal\nprintf '%x\\n' 255 # Decimal to hex\nprintf '%o\\n' 255 # Decimal to octal\n\n# In Python\nbin(255), oct(255), hex(255)