Hex, binary, octal & decimal converter
Convert between hexadecimal, decimal, binary and octal instantly. Type in any box and the others update. Includes two's complement, any base from 2 to 36 and a bitwise calculator (AND, OR, XOR, NOT, shifts).
Runs in your browser. Nothing is uploaded.Details
Type a number in any box.
Bitwise calculator
How to convert hex to decimal
Each hex digit is worth 16 times the one to its right. For 2F: 2 × 16 + 15 = 47. The letters A–F stand for 10–15.
How to convert decimal to binary
Keep dividing by 2 and write down the remainders from bottom to top. For 13: 13→6 r1, 6→3 r0, 3→1 r1, 1→0 r1, so 13 = 1101.
Handy for
- Computer science GCSE and A-level homework
- Colour codes (#FF6B35 = 255, 107, 53). Try our colour picker.
- Programming, networking (subnet masks) and electronics
Questions
Can it handle very large numbers?
Yes. It uses exact whole-number maths, so numbers of any length convert without rounding.
What is two's complement?
It's how computers store negative numbers. Type a negative decimal (e.g. -5) and choose the word size to see its two's complement binary.
Can I use 0x or 0b prefixes?
Yes. 0xFF, 0b1010 and 0o17 are accepted, and spaces or underscores between digits are ignored.
More free tools
Scientific calculator
Fractions, surds, trig, logs, nCr, memory and a table of values.
Fraction calculator
Add, subtract, multiply and divide fractions, with working.
Mean, median & mode calculator
Mean, median, mode, range, quartiles and standard deviation.
Invoice generator
Make a professional invoice with VAT and save it as a PDF.
Merge PDF
Combine several PDFs into one file, in any order.
Compress PDF
Make PDFs smaller for email and uploads.
PDF to Word
Turn PDF text into an editable Word document.
Take-home pay calculator
Your UK salary after tax, NI, pension and student loan (2026/27).