Convert Number Bases
Type a number in binary, octal, decimal or hex and the other fields update at once. Large values such as 64-bit IDs and hashes stay exact.
- Free
- Runs in your browser
- Bases 2 to 36
- No sign-up
How It Works
Convert a number in three steps.
Type in any field
Binary, octal, decimal, hex or a base of your choice.
See all bases
The other fields update as you type.
Copy the one you need
Each field has its own copy button.
How do number bases work?
A base sets how many digits a number system has. Decimal uses ten (0-9), binary two (0 and 1), octal eight (0-7) and hexadecimal sixteen (0-9 then A-F). Computers store everything in binary; hex is a compact way to write it, because each hex digit is exactly four bits. That is why colors (#FF8800), memory addresses and byte dumps are written in hex.
Negative numbers are shown with a minus sign, not as two's complement. -1 is -1 in binary here, not 11111111, because two's complement depends on a fixed bit width.
Exact for big numbers
Uses arbitrary-precision integers, so 18446744073709551615 converts to FFFFFFFFFFFFFFFF exactly.
Prefixes and separators
0x, 0b and 0o prefixes are accepted, and spaces, commas and underscores between digits are ignored.
Digit grouping
Shows binary and hex in groups of four and decimal in groups of three.
Any base to 36
Base 36 uses 0-9 and A-Z and is sometimes used for short IDs.
Convert PDF Files and File Formats
Find the perfect online tool to combine PDF files, compress documents, and handle your daily workflow effortlessly.
PDF Tools
All your PDF needs in one place
- Merge PDF
- Organize PDF
- Split PDF
- Compress PDF
- Convert to Word
- Convert to Image
Image Tools
Edit and optimize your images
- Resize Image
- Compress Image
- Convert Format
- Crop Image
- Add Watermark
- Remove Background
Word Tools
Work with Word documents
- Convert to PDF
- Merge Documents
- Split Documents
- Compress File
- Edit Text
- Add Watermark
Excel Tools
Process Excel spreadsheets
- Convert to PDF
- Convert to CSV
- Merge Sheets
- Split Sheets
- Compress File
- Clean Data
Why Use This Converter
Made for programmers and students.
Type anywhere
Every field is an input, so you can start from whichever base you have.
No precision loss
Unlike a basic calculator, large values never round.
Bit count
Shows how many bits the number needs, handy when choosing an integer type.
Private
Calculated in your browser.
Frequently Asked Questions
Questions people ask about the Number Base Converter.
Multiply each digit by 16 raised to its position, counting from 0 on the right, and add them up. 2F is 2 × 16 + 15 = 47. The tool does this for numbers of any length.
Yes. Prefixes that match the field's base are accepted: 0x for hex, 0b for binary, 0o for octal.
No. It converts whole numbers only. Fractional values such as 0.1 often have no exact binary form, which is a different topic from base conversion.
With a minus sign in every base. For the two's complement form used by computers, take the bit width you need (8, 16, 32 or 64 bits) and add 2 to that power to the negative number.
Related Text & Developer Tools
More small utilities that run in your browser.
Unit Converter
Convert length, weight, temperature, volume and more.
Color Converter
Convert colors between HEX, RGB, HSL and HSV.
Unix Timestamp Converter
Convert Unix time to a date and back.
Hash Generator
Make MD5, SHA-1, SHA-256 and SHA-512 hashes of text.
PX to REM Converter
Convert pixels to rem and rem to pixels.