Number Base Converter

Number Base Converter instantly converts any whole number between binary, octal, decimal and hexadecimal. Type a value, pick its base, and see all four representations at once. All processing happens locally in your browser, and nothing is sent to a server.

Copied!

Step-by-step working

Binary, octal and hex table (0 to 32)

The same values written in each base. Binary is padded to 8 bits, the size of one byte.

Decimal (10)Binary (2)Octal (8)Hex (16)
00000000000
10000000111
20000001022
30000001133
40000010044
50000010155
60000011066
70000011177
800001000108
900001001119
100000101012A
110000101113B
120000110014C
130000110115D
140000111016E
150000111117F
16000100002010
17000100012111
18000100102212
19000100112313
20000101002414
21000101012515
22000101102616
23000101112717
24000110003018
25000110013119
2600011010321A
2700011011331B
2800011100341C
2900011101351D
3000011110361E
3100011111371F
32001000004020

About Number Base Conversion

Number base (or radix) conversion expresses the same value in different numeral systems. Binary (base 2) uses 0-1, octal (base 8) uses 0-7, decimal (base 10) uses 0-9, and hexadecimal (base 16) uses 0-9 and a-f.

This converter uses arbitrary-precision integers, so very large numbers convert accurately without rounding errors.

Base conversion shows up everywhere in programming: memory addresses and colour codes in hexadecimal, file permissions in octal, and bitmasks or flags in binary. Hexadecimal stays popular because two hex digits map neatly onto one byte, which makes raw data compact and easy to scan.

Set a register width and negative numbers stop being a minus sign in front of a magnitude and become the bit pattern the hardware actually holds, which is what a debugger shows you and what a protocol on the wire carries. The bit row underneath spells that pattern out in full, padded to the width, so a value like -1 reads as a run of ones rather than as a number. Everything is computed with arbitrary precision integers, so a 64 bit value stays exact instead of rounding above 2^53.

Reshaping data by hand again?

A payload you have to fix in a browser tab every time is a job for code. We build the integrations, parsers and services that move data between systems, and we repair the ones that quietly corrupt it on the way through.

Tell us what you are moving

Frequently Asked Questions

Is this number base converter free and private?

Yes. It is completely free and runs entirely in your browser, so the numbers you convert are never uploaded or stored on any server.

How large a number can it convert?

It uses arbitrary-precision (BigInt) arithmetic, so it converts very large integers between binary, octal, decimal and hexadecimal without rounding or overflow errors.

Can it convert negative numbers or hex with a 0x prefix?

Yes. Negative values are supported, and common prefixes like 0x, 0b and 0o are accepted; spaces and underscores in the input are ignored.

Which bases can I convert to?

Binary, octal, decimal and hexadecimal are always shown, and the extra row does any base from 2 to 36 using digits and then letters. Base 36 is the densest a number can be written with the plain alphabet, which is why short identifiers often use it.

Why does the copy button strip the grouping?

Because grouping is there to be read, not pasted. The spaces and commas that make a long binary value legible would be rejected by anything you paste it into, so copying gives you the bare digits.

How do I convert binary to decimal by hand?

Write the powers of 2 under the digits from right to left (1, 2, 4, 8, 16 and so on) and add the powers that sit under a 1. For 1011 that is 8 + 0 + 2 + 1 = 11. The same method works for any base: use powers of 8 for octal or 16 for hex. Type a number above and the converter shows this working for you.

How do I convert decimal to binary by hand?

Divide the number by 2 and write down the remainder, then divide the result by 2 again, until you reach 0. Reading the remainders from the last one to the first gives the binary number: 11 gives remainders 1, 1, 0, 1, so 11 is 1011. Divide by 8 or 16 instead to get octal or hex.

A PROJECT STARTS WITH A CONVERSATION

Tell us what
you have in mind.

Share the outcome you need, your existing systems and any constraints. You don't need a technical specification to start.

If the form does not work, email us directly at contact@mecanik.dev

Direct engineering support

Direct technical collaboration.
A clear scope and accountable delivery.