Free converter

Binary, Decimal and Hex Converter

Enter a number and its base. The converter shows the same value in binary (base 2), octal (8), decimal (10), hexadecimal (16) and base 36.

Report a problem or suggest a fix for this tool

What is binary, decimal and hex converter?

Computers work in binary, programmers read hexadecimal, and everyday life uses decimal. Moving between them is a daily task in programming, networking, electronics and computer science classes.

This tool converts any whole number between the common bases and checks that your digits are valid for the base you chose.

How to use the binary, decimal and hex converter

  1. Type the number.
  2. Choose the base it is written in.
  3. Read the value in all other bases.

How the binary, decimal and hex converter works

The number is first read in its own base to get a value, then written out again in each target base. Letters A to F stand for 10 to 15 in hexadecimal.

Worked example

Decimal 255 is binary 11111111, octal 377 and hexadecimal FF. Hexadecimal 1A is decimal 26.

Common uses of the binary, decimal and hex converter

  • Reading memory addresses and color codes as a developer.
  • Learning binary for computer science classes.
  • Debugging bit flags and permissions.
  • Converting between hex and decimal in networking tasks.
  • Creating short IDs using base 36.

Tips and common mistakes

Hexadecimal is popular because one hex digit equals exactly four binary digits.

Colors such as #FF8800 are three hex pairs for red, green and blue.

Background: what to know before you rely on it

Computers store data as bits, each either 0 or 1. Binary strings are long and hard to read, so programmers group four bits into one hexadecimal digit, which is why a byte is shown as two hex digits from 00 to FF. Octal groups three bits and appears in Unix file permissions, such as 755. Base 36 uses all digits and letters and is handy for short URLs. To convert by hand, repeatedly divide by the target base and read the remainders backward. Practice a few conversions and you will start to see patterns, for example that every power of two is a one followed by zeros in binary.

Private, free and fast

This tool runs entirely in your browser. What you type or choose is not uploaded to a server and is not saved after you close the page, which keeps it fast and private. It is free to use as often as you like. See more in all converters, or browse the full list of tools.

Field by field guide

  • Number: Type your value. The example is 255.
  • Base of the number you entered: Choose one of: Binary (2); Octal (8); Decimal (10); Hexadecimal (16); Base 36.

Change one field at a time to see how the result responds, and use the worked example above to check that you get the same answer.

Frequently asked questions

How do I convert binary to decimal?

Multiply each binary digit by a power of 2 and add the results. Or use this tool.

What is FF in decimal?

255.

Does it support fractions?

No, whole numbers only.

Guides that go with this tool

Embed this tool on your website

Copy the code below and paste it into your page or blog post. The tool is free to embed, runs in the visitor's browser and needs no account. Please keep the credit link.

Related tools

More free tools people use next

  • Time Zone Converter: Choose a date and time and the zone it applies to. The converter shows the same moment in...
  • Average Calculator: The average, or mean, is the sum of the numbers divided by how many there are. This tool...
  • Random Seed Generator: A seed is a starting value for a random process. Choose a type and get seeds you can...
  • Fuel Cost Calculator: Divide the distance by your fuel economy to find how much fuel you need, then multiply by...
  • CSV to JSON Converter: Paste CSV data with a header row and the tool returns a JSON array of objects. It handles...
  • Markdown to HTML Converter: Type or paste Markdown to get HTML code and a live preview. It supports headings, bold,...
  • Data Storage Converter: Enter a size and choose its unit to see it in every other storage unit. Decimal units use...
  • HTML Entity Encoder and Decoder: Paste text to turn characters such as less than, greater than, ampersand and quotes into...
  • PDF to JPG Converter: Choose a PDF and a resolution. Each page is converted to a JPG image that you can preview...
  • Speed Distance Time Calculator: Choose what you want to find, enter the other two values and read speed, distance and...
  • Length Converter: Enter a length, choose the units and read the exact conversion. A table shows the value...
  • Weight Converter: Enter a weight, choose the units and read the exact result. A table shows the value in...
  • Speed Converter: Enter a speed, choose the units and read the result. A table shows the value in km/h,...
  • Volume Converter: Enter a volume, choose the units and read the result. A table shows the value in every...
  • Pressure Converter: Enter a pressure, choose the units and read the exact result. A table shows the value in...
  • Energy Converter: Enter an amount of energy, choose the units and read the exact result. A table shows...
  • Power Converter: Enter a power value, choose the units and read the exact result. A table shows every...
  • HTML Formatter: Paste your HTML and press Format. Each tag is placed on its own line with nested elements...
  • Text to Hex Converter: Type text to get its hex bytes and decimal codes, or paste hex to turn it back into text....
  • Video Trimmer: Choose a video, enter the start and end in seconds and press Trim video. The clip is...
  • Subtitle Converter: Paste your subtitle text, choose SRT to VTT or VTT to SRT, and optionally shift all times...

Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Check critical conversions with an official source.