Skip to content

Binary to Decimal Converter

Convert binary numbers to decimal (base 10) instantly. Supports grouped input with spaces.

How to Convert Binary to Decimal

Binary is base-2, so each position represents a power of 2:

  1. Starting from the right, assign each bit a power of 2 (2⁰, 2¹, 2², ...)
  2. Multiply each bit (0 or 1) by its power of 2
  3. Sum all the results

Example: Convert 1010 to decimal:

  • 1 × 2³ = 8
  • 0 × 2² = 0
  • 1 × 2¹ = 2
  • 0 × 2⁰ = 0
  • Result: 8 + 0 + 2 + 0 = 10

Code Examples

const binary = "1010";
const decimal = parseInt(binary, 2); // 10
// With 0b prefix:
const value = 0b1010; // 10

Frequently Asked Questions

How do I convert binary to decimal?

Multiply each binary digit by its position value (2^n, starting from 0 on the right) and sum the results. For example, 1010 = (1×8) + (0×4) + (1×2) + (0×1) = 10.

Why do computers use binary?

Computers use binary because electronic circuits have two stable states: on (1) and off (0). This makes binary the most reliable way to store and process data electronically.

What is a nibble?

A nibble is 4 bits, which is half a byte. One nibble can represent values 0-15, which corresponds to exactly one hexadecimal digit. Binary is often grouped into nibbles for readability.

Related Tools

Conversion Table: Decimal, Hex, Binary, and Octal (0-255)

Every value one byte can hold, in all four common number bases.

DecimalHexBinaryOctal
00000000000000
10100000001001
20200000010002
30300000011003
40400000100004
50500000101005
60600000110006
70700000111007
80800001000010
90900001001011
100A00001010012
110B00001011013
120C00001100014
130D00001101015
140E00001110016
150F00001111017
161000010000020
171100010001021
181200010010022
191300010011023
201400010100024
211500010101025
221600010110026
231700010111027
241800011000030
251900011001031
261A00011010032
271B00011011033
281C00011100034
291D00011101035
301E00011110036
311F00011111037
322000100000040
332100100001041
342200100010042
352300100011043
362400100100044
372500100101045
382600100110046
392700100111047
402800101000050
412900101001051
422A00101010052
432B00101011053
442C00101100054
452D00101101055
462E00101110056
472F00101111057
483000110000060
493100110001061
503200110010062
513300110011063
523400110100064
533500110101065
543600110110066
553700110111067
563800111000070
573900111001071
583A00111010072
593B00111011073
603C00111100074
613D00111101075
623E00111110076
633F00111111077
644001000000100
654101000001101
664201000010102
674301000011103
684401000100104
694501000101105
704601000110106
714701000111107
724801001000110
734901001001111
744A01001010112
754B01001011113
764C01001100114
774D01001101115
784E01001110116
794F01001111117
805001010000120
815101010001121
825201010010122
835301010011123
845401010100124
855501010101125
865601010110126
875701010111127
885801011000130
895901011001131
905A01011010132
915B01011011133
925C01011100134
935D01011101135
945E01011110136
955F01011111137
966001100000140
976101100001141
986201100010142
996301100011143
1006401100100144
1016501100101145
1026601100110146
1036701100111147
1046801101000150
1056901101001151
1066A01101010152
1076B01101011153
1086C01101100154
1096D01101101155
1106E01101110156
1116F01101111157
1127001110000160
1137101110001161
1147201110010162
1157301110011163
1167401110100164
1177501110101165
1187601110110166
1197701110111167
1207801111000170
1217901111001171
1227A01111010172
1237B01111011173
1247C01111100174
1257D01111101175
1267E01111110176
1277F01111111177
1288010000000200
1298110000001201
1308210000010202
1318310000011203
1328410000100204
1338510000101205
1348610000110206
1358710000111207
1368810001000210
1378910001001211
1388A10001010212
1398B10001011213
1408C10001100214
1418D10001101215
1428E10001110216
1438F10001111217
1449010010000220
1459110010001221
1469210010010222
1479310010011223
1489410010100224
1499510010101225
1509610010110226
1519710010111227
1529810011000230
1539910011001231
1549A10011010232
1559B10011011233
1569C10011100234
1579D10011101235
1589E10011110236
1599F10011111237
160A010100000240
161A110100001241
162A210100010242
163A310100011243
164A410100100244
165A510100101245
166A610100110246
167A710100111247
168A810101000250
169A910101001251
170AA10101010252
171AB10101011253
172AC10101100254
173AD10101101255
174AE10101110256
175AF10101111257
176B010110000260
177B110110001261
178B210110010262
179B310110011263
180B410110100264
181B510110101265
182B610110110266
183B710110111267
184B810111000270
185B910111001271
186BA10111010272
187BB10111011273
188BC10111100274
189BD10111101275
190BE10111110276
191BF10111111277
192C011000000300
193C111000001301
194C211000010302
195C311000011303
196C411000100304
197C511000101305
198C611000110306
199C711000111307
200C811001000310
201C911001001311
202CA11001010312
203CB11001011313
204CC11001100314
205CD11001101315
206CE11001110316
207CF11001111317
208D011010000320
209D111010001321
210D211010010322
211D311010011323
212D411010100324
213D511010101325
214D611010110326
215D711010111327
216D811011000330
217D911011001331
218DA11011010332
219DB11011011333
220DC11011100334
221DD11011101335
222DE11011110336
223DF11011111337
224E011100000340
225E111100001341
226E211100010342
227E311100011343
228E411100100344
229E511100101345
230E611100110346
231E711100111347
232E811101000350
233E911101001351
234EA11101010352
235EB11101011353
236EC11101100354
237ED11101101355
238EE11101110356
239EF11101111357
240F011110000360
241F111110001361
242F211110010362
243F311110011363
244F411110100364
245F511110101365
246F611110110366
247F711110111367
248F811111000370
249F911111001371
250FA11111010372
251FB11111011373
252FC11111100374
253FD11111101375
254FE11111110376
255FF11111111377