Base Converter (Binary / Octal / Decimal / Hex)

All processing happens in your browser. No data sent to servers

How to Use the Base Converter

Enter a number into any of the four fields (Binary, Octal, Decimal, Hexadecimal) and the other three will update instantly in real-time. No button click required. Click the copy button next to each field to copy the raw value (without separators) to your clipboard — ready to paste directly into your code. Select a "Bit Width" to display the two's complement representation, useful for embedded systems development and computer science studies. Switch "Sign" to "Signed" to work with negative numbers. Click "+ Add Base N" to add a custom base field (2–36). This lets you convert to and from any number base, including base-3, base-5, base-36, and more.

Common Conversion Table (Binary / Octal / Decimal / Hex)

Common Conversion Table (Binary / Octal / Decimal / Hex)
DECBINOCTHEX
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
33001000014121
34001000104222
35001000114323
36001001004424
37001001014525
38001001104626
39001001114727
40001010005028
41001010015129
4200101010522A
4300101011532B
4400101100542C
4500101101552D
4600101110562E
4700101111572F
48001100006030
49001100016131
50001100106232
51001100116333
52001101006434
53001101016535
54001101106636
55001101116737
56001110007038
57001110017139
5800111010723A
5900111011733B
6000111100743C
6100111101753D
6200111110763E
6300111111773F
640100000010040
650100000110141
660100001010242
670100001110343
680100010010444
690100010110545
700100011010646
710100011110747
720100100011048
730100100111149
74010010101124A
75010010111134B
76010011001144C
77010011011154D
78010011101164E
79010011111174F
800101000012050
810101000112151
820101001012252
830101001112353
840101010012454
850101010112555
860101011012656
870101011112757
880101100013058
890101100113159
90010110101325A
91010110111335B
92010111001345C
93010111011355D
94010111101365E
95010111111375F
960110000014060
970110000114161
980110001014262
990110001114363
1000110010014464
1010110010114565
1020110011014666
1030110011114767
1040110100015068
1050110100115169
106011010101526A
107011010111536B
108011011001546C
109011011011556D
110011011101566E
111011011111576F
1120111000016070
1130111000116171
1140111001016272
1150111001116373
1160111010016474
1170111010116575
1180111011016676
1190111011116777
1200111100017078
1210111100117179
122011110101727A
123011110111737B
124011111001747C
125011111011757D
126011111101767E
127011111111777F
1281000000020080
1291000000120181
1301000001020282
1311000001120383
1321000010020484
1331000010120585
1341000011020686
1351000011120787
1361000100021088
1371000100121189
138100010102128A
139100010112138B
140100011002148C
141100011012158D
142100011102168E
143100011112178F
1441001000022090
1451001000122191
1461001001022292
1471001001122393
1481001010022494
1491001010122595
1501001011022696
1511001011122797
1521001100023098
1531001100123199
154100110102329A
155100110112339B
156100111002349C
157100111012359D
158100111102369E
159100111112379F
16010100000240A0
16110100001241A1
16210100010242A2
16310100011243A3
16410100100244A4
16510100101245A5
16610100110246A6
16710100111247A7
16810101000250A8
16910101001251A9
17010101010252AA
17110101011253AB
17210101100254AC
17310101101255AD
17410101110256AE
17510101111257AF
17610110000260B0
17710110001261B1
17810110010262B2
17910110011263B3
18010110100264B4
18110110101265B5
18210110110266B6
18310110111267B7
18410111000270B8
18510111001271B9
18610111010272BA
18710111011273BB
18810111100274BC
18910111101275BD
19010111110276BE
19110111111277BF
19211000000300C0
19311000001301C1
19411000010302C2
19511000011303C3
19611000100304C4
19711000101305C5
19811000110306C6
19911000111307C7
20011001000310C8
20111001001311C9
20211001010312CA
20311001011313CB
20411001100314CC
20511001101315CD
20611001110316CE
20711001111317CF
20811010000320D0
20911010001321D1
21011010010322D2
21111010011323D3
21211010100324D4
21311010101325D5
21411010110326D6
21511010111327D7
21611011000330D8
21711011001331D9
21811011010332DA
21911011011333DB
22011011100334DC
22111011101335DD
22211011110336DE
22311011111337DF
22411100000340E0
22511100001341E1
22611100010342E2
22711100011343E3
22811100100344E4
22911100101345E5
23011100110346E6
23111100111347E7
23211101000350E8
23311101001351E9
23411101010352EA
23511101011353EB
23611101100354EC
23711101101355ED
23811101110356EE
23911101111357EF
24011110000360F0
24111110001361F1
24211110010362F2
24311110011363F3
24411110100364F4
24511110101365F5
24611110110366F6
24711110111367F7
24811111000370F8
24911111001371F9
25011111010372FA
25111111011373FB
25211111100374FC
25311111101375FD
25411111110376FE
25511111111377FF

How to Convert Between Number Bases

Binary to Decimal Conversion

Decimal to Binary Conversion

Hexadecimal Conversion

Binary to Decimal: Multiply each digit by its positional power of 2 (from right to left) and sum the results. For example, binary 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13 in decimal. Decimal to Binary: Repeatedly divide by 2 and read the remainders from bottom to top. For example, 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1. Reading remainders bottom-up gives 1101 in binary. Hexadecimal Conversion: Hex uses 16 symbols (0–9 and A–F). Converting between binary and hex is straightforward — group binary digits into sets of 4 from the right, then convert each group to a single hex digit. For example, binary 11111111 = 1111 1111 = FF in hex. This 4-bit-to-1-digit correspondence is why hexadecimal is widely used for memory addresses and color codes (#FF0000, etc.) in computing.

What is Two's Complement? Representing Negative Numbers

Two's complement is the most common method computers use to represent negative numbers. In an 8-bit system, -1 is represented as 11111111 and -128 as 10000000. To find the two's complement: invert all bits (0→1, 1→0), then add 1. For example, to represent -5 in 8 bits: start with 5 (00000101), invert to get 11111010, add 1 to get 11111011 — that's -5 in two's complement. The key advantage of two's complement is that addition circuits can handle subtraction automatically. When computing 5 + (-3), simply add 5 (00000101) and the two's complement of -3 (11111101) to get 100000010. Discard the overflow bit to get 00000010 (= 2). Select a bit width (8/16/32/64) in the tool above to see the two's complement representation of any value. Useful for systems programming and computer science coursework.

Frequently Asked Questions

What is 11111111 in binary?
11111111 in binary equals 255 in decimal. Each digit represents a power of 2: 128+64+32+16+8+4+2+1=255. Enter '11111111' in the tool above to verify instantly.
What is the binary number system?
Binary (base-2) is a number system that uses only two digits: 0 and 1. All data inside computers is processed in binary. Unlike the decimal system (0-9) we use daily, each place value doubles as you move left.
Can it handle large numbers (64-bit)?
Yes, this tool accurately converts numbers up to 64-bit (max 18,446,744,073,709,551,615). It uses BigInt internally, so it handles values beyond JavaScript's standard 53-bit precision limit.
Is my data sent to a server?
No. All conversion happens entirely in your browser. No data is ever transmitted to any server. It works even without an internet connection.
Can it convert decimal fractions?
Currently, only integers are supported. Fractional base conversion (e.g., converting 0.1 to binary) is planned for a future update.

Related Tools