Decimal to Binary, Hex and Octal Converter

Convert numbers between binary, octal, decimal, hex and base 36 in your browser.

Free, no limit Nothing uploaded Works offline No sign-up

The same quantity, written five ways

A base is only a way of writing a number, not a different number. Two hundred and fifty five is 255 in decimal, FF in hexadecimal and 11111111 in binary, and all three are the same quantity of things.

Type a value, say which base it is in, and every other base appears at once. Prefixes are understood, so 0x for hex, 0b for binary and 0o for octal are stripped before conversion rather than treated as digits.

Hexadecimal is common in computing because it lines up with binary exactly: one hex digit is four bits, so a byte is always two hex digits. That is why colour codes, memory addresses and byte dumps are all written in hex rather than decimal, where the alignment would be lost.

A decimal number shown at once in binary, octal and hexadecimal

How to use it

Paste into the left box and the result appears in the right one as you type. Change any option and it recalculates immediately.

Copy puts the result on your clipboard and confirms it did. Download saves it as a file, which is the easier route when the output is long enough that selecting it by hand is a nuisance. Clear empties the boxes and puts the cursor back where you need it.

Where a sample button appears, it loads a small realistic example. It is there so you can see what the tool expects before pasting your own material, which is quicker than reading a description of the input format.

Keyboard and mobile

The text areas are ordinary form fields, so every shortcut your system already has works: select all, undo, redo, and paste without formatting. Tab moves between the panes and the controls in the order you would expect, and every control is reachable without a mouse.

On a phone the panes stack rather than sitting side by side, and the text areas grow to a comfortable height. Spellcheck and autocorrect are switched off in them, because a tool that silently capitalises your number base input is worse than useless.

If something looks wrong

When the result is not what you expected, the message under the boxes is the first thing to read. It reports what happened rather than a generic failure, so a malformed input names the line to look at and a successful run reports what it did, such as how many lines it kept or how many replacements it made.

A count of zero is informative in itself. It usually means the input did not contain what you thought it did, most often because of capitalisation or an invisible trailing space, both of which are far more common in pasted data than people expect.

Nothing is corrected silently. If the input cannot be handled, the output is left empty and the reason is stated, rather than a partial result being returned that looks plausible and is wrong. A tool that guesses is worse than one that says it could not.

Where each base turns up

Every base on this page is in daily use somewhere, and knowing which is which saves a lot of confusion.

  • Binary, base 2, for bit flags, permission masks and anything describing individual bits.
  • Octal, base 8, mainly for Unix file permissions. 755 means read, write and execute for the owner and read and execute for everyone else.
  • Decimal, base 10, for everything a person reads.
  • Hexadecimal, base 16, for colour codes, memory addresses, byte values and hashes.
  • Base 36, digits plus letters, for short identifiers where the alphabet is being used to keep a code compact.

Reference values worth knowing

A short table beats a calculator for the values that come up constantly.

ValueMeaningWhere you meet it
255Largest unsigned 8 bit numberColour channels, byte values
65535Largest unsigned 16 bit numberPort numbers, older limits
2147483647Largest signed 32 bit numberDatabase ids, integer overflow
1000000000Unix time, September 2001A round number in logs
2147483647Unix time, January 2038The 32 bit rollover

The 32 bit boundary is the one that still causes outages. A signed 32 bit integer stops at 2,147,483,647, and any system that stores an identifier or a timestamp that way fails when it gets there. Auto incrementing database keys hit it regularly on busy tables, usually at the worst possible moment.

The 8 bit boundary is why colour channels run 0 to 255 and why a byte written in hexadecimal is always exactly two digits. That alignment between hex and bytes is the reason hexadecimal is used at all: it makes the underlying binary readable without writing it out in ones and zeros.

Between them, those two limits explain a surprising share of the odd numbers that appear in software specifications, error messages and file formats.

Safe to use with real data

Most online developer tools post whatever you paste to a server. For a toy example that is fine. For the payload you are actually debugging, which is a production API response with customer records in it, an internal configuration file or a token, it is a data disclosure that nobody signed off.

Everything on this page runs in your browser. The parsing, the conversion and the formatting all happen in memory on your own machine. Nothing is transmitted, nothing is logged, and there is no server that could keep a copy even if someone asked it to.

You can check that yourself: open your browser's network panel, paste something in and watch nothing happen. Then disconnect from the internet and use the number base tool anyway, because once the page has loaded it does not need the network again.

That constraint also shapes what we will build. Anything that genuinely requires a server, such as looking up a value in a database, is not something we can offer honestly under these terms, so we do not offer it at all.

No limits, and no account

There is no cap on how much text you can run through this, no daily quota and no sign up wall at the point where it becomes useful. The Number Base tool costs us nothing to provide because it runs on your device rather than ours, so there is nothing to meter.

There is also nothing to install. It is one page of HTML, one stylesheet and one script, which together come to a fraction of the weight of a single photograph. It loads in well under a second on a phone connection and works immediately.

Why we built it this way

Developer tools that upload your input are a poor bargain. You get a conversion and they get your data, and the thing you pasted was usually the one piece of text you should have been most careful with. Running it locally removes the trade entirely.

The whole site is built on the same rule: if the work can be done in the browser, it is done in the browser. Over a hundred tools work that way, and the handful that genuinely cannot are the ones we have not built.

It also means the tool keeps working when we are not paying attention to it. There is no service to go down, no API key to expire and no rate limit to hit at the moment you need it most. The page you loaded is the whole program, and it will behave the same way in five years as it does today.

FAQ

Number Base

The questions people ask most about this tool.

Because one hex digit is exactly four bits, so a byte is always two hex digits. The alignment with binary is exact, which decimal cannot offer.

They are prefixes marking the base: 0x for hexadecimal, 0b for binary and 0o for octal. They are stripped before conversion here.

Digits 0 to 9 followed by letters A to Z, giving 36 symbols. It is used for short identifiers, since it packs more value into fewer characters.

Negative whole numbers convert. Fractional values are not supported, since fractions in other bases are a different problem with no single convention.

Completely, with no account, no quota and no paid tier. It runs on your own device, so there is nothing for us to meter and nothing to charge for.

No. Everything happens inside this page, in memory on your machine. Nothing is transmitted, stored or logged, and you can confirm it by watching your browser's network panel while you type.

Yes. Once the page has loaded it never needs the network again, so you can disconnect and carry on working.

None that we impose. The practical limit is your device's memory, which on a modern machine is a very large amount of text.

Yes. The panes stack on a narrow screen and the controls stay reachable. Autocorrect is switched off in the input, so nothing is silently changed as you type.

Yes, freely and with no attribution required. What you paste is yours and so is what comes out.

Yes. Binary to decimal converter, decimal to binary conversion and decimal to binary conversion examples: the same conversion, written the way different people write it, and this page does all of them.

Need a different conversion?

Over a hundred free tools, all running in your browser. Nothing is uploaded and nothing is capped.