Hex to Decimal Converter in your browser

Convert a number between hexadecimal, decimal, binary and octal, or any base from 2 to 36, right in your browser, and nothing you type is uploaded. It is exact for very long numbers, and it reads negative numbers and two's complement.

  • Nothing uploaded
  • Hex, decimal, binary, octal
  • Any base from 2 to 36
  • Free, no sign-up

Getting ready…

Quick facts from our tests

Check it yourself: once the page has loaded, turn off Wi-Fi and mobile data, and the Hex to Decimal Converter still works. Your browser's network panel (F12 on a computer) shows what you type is never sent. Google's ad code loads here too; our code never gives it what you type. How we prove it

How to convert a number between bases

  1. Type a number

    In the box of the base it is written in: hexadecimal, decimal, octal, binary or another base. A start like 0x and spaces or commas between digits are fine.

  2. Choose how to write it

    Capital letters or small ones, and a width of 8 to 64 bits if the number is signed (two's complement). Every box follows what you type.

  3. Read and copy

    The same number appears in all the other boxes, with its size. Copy the one you need.

When this tool isn't the right fit

  • You need fractions or floating point numbers. The converter reads whole numbers only: a point is not a digit. It does not show how a computer stores a number like 0.1.
  • You need to turn text into codes, or codes into text. The converter changes the base of numbers, not letters. For bytes and text use Base64 Encode and Decode.
  • Your number is longer than 50,000 digits. A longer number is not read, and the page says so. Split it, or use a tool on your own computer.
  • You need a base above 36. The digits are 0 to 9 and A to Z, so 36 is the largest base the converter offers.

Why convert numbers here

More free tools

Private like this one: your files stay on your device.

Hex to Decimal Converter: the complete guide

What hexadecimal, binary and octal are, converting by hand, negative numbers and two's complement, very long numbers, real results, privacy and tips.

In this guide
  1. What it does
  2. Step by step
  3. What it does exactly
  4. Real results
  5. Converting by hand
  6. Negative numbers
  7. Very long numbers
  8. Privacy
  9. Tips
  10. Limits
  11. Terms explained

What hexadecimal, binary and octal are, and when you need to convert

A number system's base is how many different digits it uses before it carries into the next place. Everyday numbers are base 10, decimal: ten digits, 0 to 9, and after 9 comes 10. Computers count in base 2, binary, with only 0 and 1. Programmers write those long strings of bits shorter in base 16, hexadecimal, whose digits are 0 to 9 and then A to F for ten to fifteen, and sometimes in base 8, octal, with the digits 0 to 7.

This converter shows one number in all of them at once. Type a number in any box, and the others show the same number in their base, exactly, however long it is, up to 50,000 digits. A fifth box shows any other base from 2 to 36. It all happens in your browser: what you type is never uploaded, and nothing is kept.

Where it helps:

  • A computer science course or an exam. Checking your hand conversions for a number systems chapter, from 1A3 to 419 and back.
  • Colour codes. A web colour like #FF5733 is three hexadecimal numbers: red, green and blue.
  • Programming and electronics. Register values, memory addresses, bit masks and error codes such as 0x80070005.
  • File permissions. chmod 755 on Linux is an octal number of three groups of bits.
  • Signed values. Reading a sensor's FF as -1, or seeing how -1 is stored in 32 bits.

Step by step: converting a number

  1. Type or paste a number in the box of its base, or press Try an example, which puts DEADBEEF in the hexadecimal box. The other boxes fill in as you type, and the box you typed in keeps your text as you wrote it.
  2. Don't tidy it first. Starts like 0x, # and an ending h, and spaces, commas or underscores between the digits are all read, so 0xff, DE AD BE EF and 12,34,567 work as they are.
  3. Choose capital or small letters for the digits A to F (and up to Z in other bases). Every box changes at once.
  4. For a negative number, type a minus sign in any box. To read a pattern the way a computer stores a signed number, choose a width of 8, 16, 32 or 64 bits, and read the line under the choices.
  5. For another base, type a base from 2 to 36 in the small box; base 36 is there to begin with.
  6. Copy any box with its own button. Clear all empties every box.

When a character doesn't belong to the base, the other boxes empty and a calm line under your box names the character and its place, so you can fix it at once.

What the page does, exactly

These are the page's rules in full, and the same rules are checked by our tests.

PartThe ruleExample
The boxesA number typed in any box is written in all the others as you type: hexadecimal (base 16), decimal (10), octal (8), binary (2) and one more base that you choose from 2 to 36. Clear all empties them. A box takes up to 50,000 charactersFF in hexadecimal is 255, 377 and 11111111
What you can typeDigits and letters of the base, in capitals or small letters; a plus or minus sign at the start; the base's own start (0x or # for hexadecimal, 0b for binary, 0o for octal) and, for hexadecimal, an h at the end; spaces, underscores, commas and line breaks between the digits, so 1,234,567, DE AD BE EF and 1111_0000 are read; digits of other scripts (Hindi १२३) and full-width letters0xDEAD_BEEF is 3735928559
Exact numbers of any sizeThe numbers are whole numbers kept exactly, with no rounding, so a number of 50,000 digits is as exact as 255. A digit that does not belong to the base stops the reading, and the page names it and says where it is. Fractions are not read: there is no point12G in hexadecimal: the character G at position 3 is not one
Another baseAny base from 2 to 36. The digits are 0 to 9 and then A to Z, so base 36 uses all the digits and letters. The box for it follows the number on show, and typing in it works like the others255 in base 7 is 513
Capital lettersThe letters of the numbers written are capitals to begin with. Untick the box for small letters. Changing it rewrites every boxff or FF
Negative numbersA minus sign in front makes a number negative in any base: -255 is -FF in hexadecimal and -11111111 in binary-0xFF is -255
Signed numbersWith a width of 8, 16, 32 or 64 bits chosen, a hexadecimal, octal or binary pattern whose first bit is 1 is a negative number (two's complement), and a negative number is written as its pattern, with zeros in front to fill the width. Decimal and the other base show the number with its sign. A number outside the range of the width gets a message that gives the rangeWith 8 bits, FF is -1, 80 is -128 and 7F is 127
The sizeA line under the choices says how many decimal and hexadecimal digits, bits and bytes the number has (the size of the number without its sign)255: 3 decimal digits, 2 hexadecimal digits, 8 bits (1 byte)

What the rules don't decide: the page works with whole numbers only, so there are no fractions, no floating point (it doesn't show how a computer stores a number like 0.1), and no text: it doesn't turn letters into codes. Hexadecimal digits are just the numbers 0 to 15 written as 0 to 9 and A to F. And the width for a signed number is your choice, because the same pattern means different numbers at different widths: FF is 255 as a plain number and -1 as a signed 8-bit number. Only you know which one your program uses.

Real results from our tests

We tested the Hex to Decimal Converter with headless Chromium 148, the open-source browser Chrome is built on, on a Windows laptop with an Intel Core i7-1185G7 and 32 GB of memory, on 13 October 2026. Other work was running on the laptop at the same time, so times vary a little from run to run: each time below is the middle one of 3 runs.

Converting is quick, even for very long numbers. A number of 50,000 digits typed or pasted in the decimal box had every box written, laid out and drawn 271 milliseconds later (the middle of 3 runs). In the hexadecimal box it took 277 milliseconds and in the binary box 137 milliseconds. The page's code needs only a few of those milliseconds: in Node it read 50,000 digits and wrote them in binary, octal, decimal, hexadecimal, base 7 and base 36 in 30 milliseconds or less each. The rest is the browser laying out up to 166,000 characters of binary.

Checked against a second program. Python's own integers, none of the page's code, wrote and read 8,000 random numbers of up to 3,161 characters in the bases 2, 8, 10 and 16 and one more from 2 to 36. They had signs, capital and small letters, the starts 0x and # and the ending h, groups of digits cut by spaces, underscores or commas, and Hindi digits, and the page's code gave the same numbers every time. For every number that fits, Python also wrote its two's complement pattern in 8, 16, 32 and 64 bits in hexadecimal, octal and binary, and the page matched those too: 147,952 results in all, 69,792 of them two's complement patterns. 20,000 more random numbers were written in every base from 2 to 36 and read back, and each came back as it was.

Size and offline. On a first visit the page downloads about 0.1 MB for the tool: the page, its styles, its script and the fonts, with Google's ad code not counted. In our test we switched the network off after the page had loaded and pressed Try an example: the other boxes showed 0.2 seconds later or less in each of 15 runs, and 0.1 seconds later in 11 of them.

Phone-sized screen. We also ran every test on a phone-sized screen in Chromium (390 × 844 pixels, with touch). That is not a real phone. Every button and box was 44 pixels high or more, and the page did not scroll sideways.

Try it yourself: press "Try an example" at the top of this page. It puts DEADBEEF in the hexadecimal box, and the decimal box shows 3735928559, the octal box 33653337357 and the binary box 11011110101011011011111011101111. Then type FF in the hexadecimal box and choose 8 bits for a signed number: the decimal box shows -1.

Try the example

How to convert hex, binary and octal by hand

Every base works the same way: each place is worth the base times the place to its right. Here is how to convert by hand, with numbers you can check in the tool.

Hexadecimal to decimal: multiply each digit by its place. In base 16 the places are worth 1, 16, 256, 4,096 and so on. FF is 15 × 16 + 15 = 255. 1A3 is 1 × 256 + 10 × 16 + 3 = 256 + 160 + 3 = 419.

Decimal to hexadecimal: divide by 16 and keep the remainders. 255 ÷ 16 = 15, remainder 15; 15 ÷ 16 = 0, remainder 15. Read the remainders from the last to the first: 15 and 15, which are F and F, so 255 is FF. 419 ÷ 16 = 26 remainder 3, 26 ÷ 16 = 1 remainder 10 (A), 1 ÷ 16 = 0 remainder 1: 1A3.

Binary to hexadecimal: groups of four. One hexadecimal digit is exactly four bits, so split the bits into fours from the right and write each group as a digit: 1101 0111 is D and 7, so D7, which is 215. Going back, write each hexadecimal digit as four bits: F is 1111, so FF is 11111111.

Binary to octal: groups of three. An octal digit is three bits: 111 101 101 is 7, 5 and 5, so octal 755, which is 493 in decimal.

Any other base: the same division method works for every base. 255 ÷ 7 = 36 remainder 3, 36 ÷ 7 = 5 remainder 1, 5 ÷ 7 = 0 remainder 5, so 255 is 513 in base 7. The tool's Base N box does this for any base from 2 to 36. To see the bytes of a text rather than a number, such as 01000001 for A, use Text to Binary; for Roman numerals, Roman Numeral Converter.

The Hex to Decimal Converter after converting the example DEADBEEF: the same number in the hexadecimal, decimal, octal and binary boxes, with the box for another base
The Hex to Decimal Converter after converting our example number.

Negative numbers and two's complement

A minus sign works in every base: -255 is -FF in hexadecimal, -377 in octal and -11111111 in binary, and the line under the choices starts with “Negative.”

Computers do it differently. They keep a whole number in a fixed number of bits, and for a signed number the first bit says whether it is negative. This is two's complement, and it is why a width matters:

  • 8 bits hold -128 to 127.
  • 16 bits hold -32,768 to 32,767.
  • 32 bits hold -2,147,483,648 to 2,147,483,647.
  • 64 bits hold -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

The same pattern is a different number at a different width. In 8 bits, FF is -1, 80 is -128 and 7F is 127. -1 written in 32 bits is FFFFFFFF in hexadecimal and 37777777777 in octal. With a width chosen, the hexadecimal, octal and binary boxes are filled with zeros to the full width, so 5 in 8 bits shows as 05, 005 and 00000101.

To make the pattern of a negative number by hand, write the number without its sign in binary, swap every 0 and 1, and add 1: 1 is 00000001, swapped 11111110, plus 1 gives 11111111, which is FF, or -1 in 8 bits. A number outside the width gets a clear message, such as “That does not fit in 8 bits. A signed 8-bit number goes from -128 to 127.”, or for a pattern with too many digits, “That does not fit in 8 bits. A hexadecimal number of 8 bits has at most 2 digits.” Keep the choice on Off for ordinary numbers.

Very long numbers

Each box takes up to 50,000 characters, and the numbers stay exact. That is different from most calculators and spreadsheets: a spreadsheet keeps only about 15 significant digits, and many programs stop at the 64-bit limit. Here 9,007,199,254,740,993 (2 to the 53rd, plus 1) is written as 20000000000001 in hexadecimal, and 2 to the 64th, 18,446,744,073,709,551,616, as 10000000000000000, with nothing rounded off.

Long numbers are quick: a number of 50,000 digits typed or pasted in the decimal box had every box filled 271 milliseconds later in our test, most of it the browser laying out up to 166,000 characters of binary. A longer number is not read, and the line under the box says: “That has more than 50,000 digits. The converter takes up to 50,000 at once.” Copy always takes the whole number, however long.

Private: what you type stays on your device

Your numbers never leave your device. The tool runs inside your browser and has no upload step: it never sends the numbers you type, paste or open anywhere, and it does not save them, so closing the page forgets them. The page's Content Security Policy lets it contact only this site and Google's ad service, which pays for the site; our code never gives your numbers to the ad code. You can check it yourself in your browser's network panel (F12 on a computer): converting adds no request that carries your numbers.

Numbers can be private too: account and order numbers, keys and addresses, values from your work. A converter that works on a server receives whatever you type; here your own browser does the sums, and nothing is kept once you close the page. It also works offline once the page has loaded: in our test we switched the network off and pressed Try an example, and the other boxes showed 0.2 seconds later or less in each of 15 runs. Read our privacy policy and how we prove your files are never uploaded.

The Hex to Decimal Converter after converting the example DEADBEEF: the same number in the hexadecimal, decimal, octal and binary boxes, with the box for another base, at a phone's size with the internet switched off by our test, between our test's bands that read "Internet switched off" and "Nothing uploaded: 0 requests sent data"
Proof from our testOn 9 November 2026, our test opened Hex to Decimal Converter at a phone's size, switched the internet off and ran it on its built-in example. It finished with no connection, and none of the page's 16 requests sent any data.How we test, and how to check it yourself

Tips

  • Paste a hex dump as it is. Spaces and line breaks between the bytes are skipped, so DE AD BE EF reads as DEADBEEF.
  • Colours, one part at a time. For #FF5733, convert FF, 57 and 33 on their own: red 255, green 87, blue 51.
  • File permissions are octal. 755 is 111 101 101 in binary: read, write and run for the owner, read and run for everyone else.
  • Check the width before trusting a negative. FF is -1 only in 8 bits; in 16 bits it is 255.
  • Short codes from long numbers. Base 36 uses all ten digits and all 26 letters, so 123456789 becomes 21I3V9.
  • Indian grouping is fine. 12,34,567 reads as 1234567, and digits in Devanagari, such as १२३, are read too.

Limits

  • Whole numbers only. There are no fractions or floating point numbers: a point is not a digit. The page does not show how a computer stores a number like 0.1.
  • 50,000 characters in a box. A longer number is not read, and the page says so.
  • Numbers, not text. It does not turn letters into codes or codes into letters. Use the Base64 tool for bytes and text.
  • Bases from 2 to 36. Digits are 0 to 9 and A to Z. Bases above 36 and other digits are not supported.
  • Widths of 8, 16, 32 and 64 bits. A signed number can be read as one of these. Other widths are not offered.
  • Not saved. What you typed and the answers are forgotten when you close the page.
  • Browsers. We tested only in Chromium, the engine behind Chrome and Edge, with computer and phone-sized screens. We did not test on real phones, in Safari or in Firefox, so we cannot promise how they behave.

Terms explained

Hexadecimal
Base 16, with the digits 0 to 9 and A to F, where A is 10 and F is 15. One hexadecimal digit is four bits, so two make a byte.
Decimal
Base 10, the numbers of everyday life.
Binary
Base 2, with only 0 and 1: the way computers hold numbers.
Octal
Base 8, with the digits 0 to 7. Three bits make an octal digit; Linux file permissions are written in it.
Base or radix
How many different digits a number system uses before it carries into the next place.
Two's complement
The way computers write negative whole numbers in a fixed number of bits, where the first bit says negative.
Bit and byte
A bit is one 0 or 1; a byte is eight bits, and holds a number from 0 to 255.

Frequently asked questions

Is the Hex to Decimal Converter free?

Yes. There is no sign-up, no watermark and no limit on how often you use it. Ads from Google help pay for the site, and they are kept apart from the tool.

Is what I type uploaded anywhere?

No. The tool has no upload step: it never sends what you type anywhere, and it doesn't save it. Google's ad code loads on the page, and our code never gives it what you type. You can check in your browser's network panel (F12 on a computer).

What is hexadecimal?

Base 16: the digits 0 to 9, then A to F for ten to fifteen. Programmers use it because one hexadecimal digit is exactly four bits, so a byte is two digits. A start of 0x usually marks a hexadecimal number.

How do I convert hex to decimal?

Type it in the hexadecimal box, and the decimal box shows it at once. By hand, multiply each digit by its place (1, 16, 256 and so on) and add: FF is 15 × 16 + 15 = 255.

How do I convert decimal to hex or binary?

Type it in the decimal box, and the other boxes show it. By hand, divide by 16 (or 2) again and again and read the remainders from the last to the first: 255 gives 15 and 15, so FF.

Can it read 0x, #, spaces, commas and underscores?

Yes. A hexadecimal number may start with 0x or # and end with h; binary may start with 0b and octal with 0o. Spaces, commas, underscores and line breaks between digits are skipped, so 12,34,567 and DE AD BE EF work.

Does it work for negative numbers?

Yes. Type a minus sign in any box: -255 is -FF in hexadecimal and -11111111 in binary. To read a pattern as a signed number, choose a width.

What is two's complement, and what does the signed width do?

It is how a computer keeps a negative whole number in a fixed number of bits. Choose 8, 16, 32 or 64 bits and the page reads and writes patterns that way: in 8 bits FF is -1 and the range is -128 to 127.

Why does FF show as 255 in one place and -1 in another?

It depends on the width. As a plain number FF is 255; as a signed 8-bit number its first bit is 1, so it is -1. Choose Off for 255 or 8 bits for -1.

How big a number can it handle?

Up to 50,000 digits in a box, exact with no rounding. In our test a number of 50,000 digits filled every box 271 milliseconds after it was pasted.

Can I use another base, like base 36 or base 7?

Yes, any base from 2 to 36: type it in the small box. The digits are 0 to 9 and then A to Z. 255 is 513 in base 7 and 73 in base 36.

Does it convert fractions or floating point numbers?

No. It works with whole numbers only, so a point is not a digit, and it doesn't show how a computer stores a number like 0.1.

Why does it say a character does not belong?

A digit that isn't in the base was typed, such as G in a hexadecimal number or a point in a decimal one. The message names it and its place: “Use 0 to 9 and A to F for a hexadecimal number: the character “G” at position 3 is not one.”

Does it work offline?

Yes, once the page has loaded. In our test we switched the network off and pressed Try an example, and the other boxes showed 0.2 seconds later or less in each of 15 runs.

Does it save or remember what I type?

No. The tool doesn't save it, so closing or reloading the page forgets it.

By the PDFGuild team · Updated · How we test