-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbyte-converter.html
More file actions
495 lines (475 loc) · 36.7 KB
/
Copy pathbyte-converter.html
File metadata and controls
495 lines (475 loc) · 36.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Free Byte Converter — KB MB GB TiB Online | FreeDevTool</title>
<meta name="description" content="Convert between bytes, KB, MB, GB, TB, PB and more. Support for both binary (KiB, MiB, GiB) and decimal (KB, MB, GB) units. Free data size calculator.">
<meta name="robots" content="index, follow">
<meta name="author" content="Anees Ur Rehman">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","datePublished":"2026-05-02","dateModified":"2026-05-19","inLanguage":"en-US","isPartOf":{"@type":"WebSite","name":"FreeDevTool","url":"https://freedevtool.org"}}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Person","name":"Anees Ur Rehman","url":"https://freedevtool.org/about","jobTitle":"Full-stack developer","worksFor":{"@type":"Organization","name":"FreeDevTool","url":"https://freedevtool.org"}}</script>
<link rel="canonical" href="https://freedevtool.org/byte-converter">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@300;400;500;600&display=swap" as="style">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@300;400;500;600&display=swap">
<link rel="preload" href="style.css?v=20260502-cards" as="style">
<link rel="stylesheet" href="style.css?v=20260502-cards">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/favicon.svg">
<meta property="og:image" content="https://freedevtool.org/og-image.svg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="FreeDevTool — 50+ free, fast, privacy-first developer tools">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://freedevtool.org/og-image.svg">
<meta name="twitter:title" content="Byte Converter — KB MB GB Free Tool">
<meta name="twitter:description" content="Convert bytes, KB, MB, GB, TB, PB and binary KiB, MiB, GiB, TiB. SI vs IEC standards explained. Click to copy any value.">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3L0CMH3X36"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag('js',new Date());gtag('config','G-3L0CMH3X36');</script>
<meta property="og:title" content="Byte Converter Online — Data Size Unit Converter Free">
<meta property="og:description" content="Convert between bytes, KB, MB, GB, TB. Binary and decimal units. Free calculator.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://freedevtool.org/byte-converter">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebApplication","name":"Byte Converter Online","url":"https://freedevtool.org/byte-converter","description":"Convert between data size units — bytes, KB, MB, GB, TB with binary and decimal support.","applicationCategory":"DeveloperApplication","operatingSystem":"Any","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"}}
</script>
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the difference between KB and KiB (binary vs decimal)?","acceptedAnswer":{"@type":"Answer","text":"KB (kilobyte) uses the SI decimal standard where 1 KB = 1,000 bytes. KiB (kibibyte) uses the IEC binary standard where 1 KiB = 1,024 bytes. The distinction matters because hard drive manufacturers use decimal (making drives appear larger), while operating systems traditionally use binary (showing less usable space). The IEC introduced KiB, MiB, GiB notation in 1998 to eliminate this ambiguity."}},{"@type":"Question","name":"How many bytes are in a gigabyte?","acceptedAnswer":{"@type":"Answer","text":"In decimal (SI): 1 GB = 1,000,000,000 bytes (10^9). In binary (IEC): 1 GiB = 1,073,741,824 bytes (2^30). The difference is about 7.4%. For a 500 GB hard drive, that's roughly 35 GB of 'missing' space when your OS reports in GiB."}},{"@type":"Question","name":"Why does my hard drive show less space than advertised?","acceptedAnswer":{"@type":"Answer","text":"Hard drive manufacturers measure capacity in decimal gigabytes (1 GB = 1 billion bytes) because it yields larger numbers. Operating systems like Windows display sizes in binary gibibytes (1 GiB = 1,073,741,824 bytes). A 1 TB drive (1,000,000,000,000 bytes) shows as approximately 931 GiB in Windows. macOS switched to decimal display in 2009, so Mac users see the advertised size."}},{"@type":"Question","name":"Is 1 KB equal to 1000 or 1024 bytes?","acceptedAnswer":{"@type":"Answer","text":"Both definitions exist — that is the confusion. SI/decimal standard: 1 KB = 1000 bytes (used by storage vendors, network speeds). Binary standard: 1 KiB = 1024 bytes (used by operating system file sizes, memory addresses). IEC introduced KiB/MiB/GiB in 1998 to disambiguate."}},{"@type":"Question","name":"What is the difference between bits and bytes?","acceptedAnswer":{"@type":"Answer","text":"A bit is a single binary digit (0 or 1). A byte is 8 bits. Network speeds are quoted in bits (Mbps = megabits per second), while file sizes are in bytes (MB = megabytes). 100 Mbps internet downloads at about 12.5 MB/s — divide bps by 8."}},{"@type":"Question","name":"Why does Windows show different file sizes than my drive label?","acceptedAnswer":{"@type":"Answer","text":"Drive manufacturers use decimal GB (1 GB = 1,000,000,000 bytes). Windows reports drives in binary GiB but calls it GB (1 GB = 1,073,741,824 bytes). A 1 TB drive is 1,000 GB by the label but only about 931 GB by Windows. macOS uses decimal and matches the label."}}]}
</script>
<style>
.byte-input-row{display:flex;gap:12px;align-items:center;margin-bottom:20px;flex-wrap:wrap}
.byte-input-row input{flex:1;min-width:200px;padding:12px 16px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-family:var(--mono);font-size:16px}
.byte-input-row input:focus{border-color:var(--accent);outline:none;box-shadow:0 0 0 3px rgba(0,208,132,.08)}
.byte-input-row select{padding:12px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-family:var(--mono);font-size:14px}
.byte-results{display:grid;grid-template-columns:1fr 1fr;gap:2px;background:var(--border);border-radius:var(--radius);overflow:hidden}
.byte-row{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--bg)}
.byte-row:hover{background:var(--bg2)}
.byte-label{font-size:12px;color:var(--text3);font-family:var(--mono)}
.byte-label .full{color:var(--text2);font-size:11px;display:block;margin-top:2px}
.byte-value{font-family:var(--mono);font-size:14px;color:var(--text);font-weight:500;cursor:pointer;transition:color .2s}
.byte-value:hover{color:var(--accent)}
.byte-section-label{grid-column:1/-1;padding:8px 16px;background:var(--bg4);font-size:11px;font-family:var(--mono);color:var(--accent);text-transform:uppercase;letter-spacing:1px}
.byte-presets{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}
.byte-presets button{padding:5px 12px;font-size:11px;font-family:var(--mono);background:var(--bg4);border:1px solid var(--border);border-radius:20px;color:var(--text2);cursor:pointer;transition:all .2s}
.byte-presets button:hover{border-color:var(--accent);color:var(--accent)}
@media(max-width:600px){.byte-results{grid-template-columns:1fr}}
</style>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://freedevtool.org/"
},
{
"@type": "ListItem",
"position": 2,
"name": "All Tools",
"item": "https://freedevtool.org/all-tools"
},
{
"@type": "ListItem",
"position": 3,
"name": "Byte Converter",
"item": "https://freedevtool.org/byte-converter"
}
]
}
</script>
<script src="/ga4-events.js" defer></script>
</head>
<body>
<nav>
<a class="nav-logo" href="/" aria-label="FreeDevTool home"><svg class="logo-mark" width="22" height="22" viewBox="0 0 24 24" aria-hidden="true" fill="none"><rect x="1" y="1" width="22" height="22" rx="6" fill="currentColor" opacity=".12"/><path d="M9.5 8.5L6 12l3.5 3.5M14.5 8.5L18 12l-3.5 3.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>FreeDevTool</a>
<div class="nav-links">
<div class="nav-dropdown" id="tools-dropdown">
<a href="all-tools" onclick="event.preventDefault();this.parentElement.classList.toggle('open')" aria-haspopup="true">Tools <svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg></a>
<div class="nav-dropdown-menu">
<a href="encoding-tools">
<div class="dd-icon">b64</div>
<div class="dd-info"><div class="dd-name">Encoding & Conversion</div><div class="dd-count">11 tools · Base64, YAML, px→rem</div></div>
</a>
<a href="generation-tools">
<div class="dd-icon">{ }</div>
<div class="dd-info"><div class="dd-name">Generation & Formatting</div><div class="dd-count">16 tools · JSON, SQL, gradients</div></div>
</a>
<a href="security-tools">
<div class="dd-icon">#</div>
<div class="dd-info"><div class="dd-name">Security & Hashing</div><div class="dd-count">3 tools · JWT, MD5, SHA</div></div>
</a>
<a href="text-tools">
<div class="dd-icon">.*</div>
<div class="dd-info"><div class="dd-name">Code & Text Tools</div><div class="dd-count">9 tools · Regex, diff, tokens</div></div>
</a>
<a href="devops-tools">
<div class="dd-icon">JS</div>
<div class="dd-info"><div class="dd-name">Optimization & DevOps</div><div class="dd-count">7 tools · Minifiers, cURL, git</div></div>
</a>
<a href="network-tools">
<div class="dd-icon">IP</div>
<div class="dd-info"><div class="dd-name">Network & Time</div><div class="dd-count">4 tools · IP, DNS, timestamps</div></div>
</a>
<a href="seo-tools">
<div class="dd-icon">SEO</div>
<div class="dd-info"><div class="dd-name">SEO & Meta Tools</div><div class="dd-count">3 tools · OG, meta, slug</div></div>
</a>
<div class="nav-dropdown-divider"></div>
<a class="dd-all" href="all-tools">
<div class="dd-icon">All</div>
<div class="dd-info"><div class="dd-name">Browse all 50 tools</div><div class="dd-count">Searchable catalog & categories</div></div>
</a>
</div>
</div>
<a href="/guides">Guides</a>
<a href="about">About</a>
<a href="privacy">Privacy</a>
</div>
</nav>
<div class="wrapper">
<section class="tool-header">
<a class="tool-back" href="/" aria-label="Back to home">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg>
Back
</a>
<span class="tool-badge">Conversion</span>
<h1>Byte Converter</h1>
<p>Convert between data size units instantly. Supports both decimal (SI) units like KB, MB, GB and binary (IEC) units like KiB, MiB, GiB. Click any value to copy it.</p>
<div class="last-updated">Last updated: May 2026 · Written by <a href="/about">Anees Ur Rehman</a>, full-stack developer</div>
</section>
<div class="tool-card">
<div class="card-dots"><span></span><span></span><span></span></div>
<div class="tool-body">
<div class="byte-input-row">
<input type="number" id="byte-input" value="1" min="0" step="any" placeholder="Enter value...">
<select id="byte-unit">
<option value="b">Bytes</option>
<option value="kb">KB (Kilobyte)</option>
<option value="mb" selected>MB (Megabyte)</option>
<option value="gb">GB (Gigabyte)</option>
<option value="tb">TB (Terabyte)</option>
<option value="pb">PB (Petabyte)</option>
<option value="kib">KiB (Kibibyte)</option>
<option value="mib">MiB (Mebibyte)</option>
<option value="gib">GiB (Gibibyte)</option>
<option value="tib">TiB (Tebibyte)</option>
<option value="bit">Bits</option>
</select>
</div>
<div class="byte-presets">
<button onclick="setPreset(1,'mb')">1 MB</button>
<button onclick="setPreset(1,'gb')">1 GB</button>
<button onclick="setPreset(4,'gb')">4 GB</button>
<button onclick="setPreset(8,'gb')">8 GB</button>
<button onclick="setPreset(1,'tb')">1 TB</button>
<button onclick="setPreset(64,'gb')">64 GB</button>
<button onclick="setPreset(256,'gb')">256 GB</button>
</div>
<div class="byte-results" id="byte-results"></div>
</div>
</div>
<div id="toast" style="position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:var(--accent);color:#000;padding:8px 20px;border-radius:var(--radius);font-size:13px;font-weight:600;opacity:0;transition:opacity .3s;pointer-events:none;z-index:999">Copied!</div>
<p class="aeo-lead" style="font-size:16px;line-height:1.7;color:var(--text);max-width:760px;margin:24px auto 18px;padding:0 4px">
<strong>Byte units</strong> come in two incompatible systems: decimal SI (KB = 1000 bytes, used by storage vendors and network speeds) and binary IEC (KiB = 1024 bytes, used by operating systems and memory). A 500 GB hard drive ships 500,000,000,000 bytes but Windows reports it as ~465 GiB. This <strong>free byte converter</strong> shows both systems side by side so you know exactly which unit your data is in.
</p>
<section id="examples" style="max-width:760px;margin:24px auto 32px">
<h2 style="font-size:18px;margin-bottom:14px">Examples</h2>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Decimal vs binary§§1 KB = 1,000 bytes (decimal, SI)§§1 KiB = 1,024 bytes (binary, IEC)§§A 500 GB drive ships 500 billion bytes; Windows reports it as ~465 GiB.</strong>
</div>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Network speed vs file size§§1 Mbps download speed = 0.125 MB/s. A 100 MB file takes ~13 minutes on 1 Mbps, ~10 seconds on 100 Mbps.</strong>
</div>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Storage industry lawsuits§§Drive vendors won the lawsuit that confirmed they can use decimal units (GB = 10^9 bytes). Operating systems mostly use binary (GiB = 2^30 bytes). The gap grows: 4 TB drive = ~3.64 TiB.</strong>
</div>
</section>
<aside class="founder-note" style="max-width:760px;margin:24px auto 32px;padding:20px 24px;background:rgba(0,208,132,0.05);border-left:3px solid var(--accent);border-radius:6px;font-size:14px;line-height:1.7;color:var(--text2)"><div style="font-family:var(--mono);font-size:11px;color:var(--accent);letter-spacing:1.5px;text-transform:uppercase;margin-bottom:10px;font-weight:600">💡 Why I built this</div><p style="margin:0 0 12px">I built this after losing a debate with a vendor over whether their 500 GB disk was 500,000,000,000 bytes or 500 times 1024 cubed bytes. The first is what they actually shipped, the second is what the OS reports. This converter shows both — decimal SI (KB = 1000) and binary IEC (KiB = 1024) — side by side. Storage vendors win lawsuits over this distinction; you should know which one your spreadsheet is using.</p><p style="margin:0;font-size:13px;color:var(--text3)">— <a href="/about" style="color:var(--accent);text-decoration:none">Anees Ur Rehman</a>, full-stack developer</p></aside>
<section class="article-section">
<h2>KB vs KiB — the binary / decimal split, the storage industry's lawsuit history, and why it still matters</h2>
<p>Computer storage has two coexisting unit systems that look almost identical and differ by ~7%. The split has been the subject of class-action lawsuits against drive manufacturers, design changes in macOS, and a still-unfinished standardization effort that started in 1998. This guide breaks down the SI / IEC distinction, the practical numbers you need to remember, the operating system that displays each variant, and the network-vs-storage convention split that bites every backend engineer.</p>
<h3>The two systems — SI vs IEC</h3>
<table class="ref-table">
<thead><tr><th>SI (decimal, base 10)</th><th>Bytes</th><th>IEC (binary, base 2)</th><th>Bytes</th></tr></thead>
<tbody>
<tr><td>kilobyte (KB)</td><td>1 000 (10³)</td><td>kibibyte (KiB)</td><td>1 024 (2¹⁰)</td></tr>
<tr><td>megabyte (MB)</td><td>1 000 000 (10⁶)</td><td>mebibyte (MiB)</td><td>1 048 576 (2²⁰)</td></tr>
<tr><td>gigabyte (GB)</td><td>10⁹</td><td>gibibyte (GiB)</td><td>2³⁰ ≈ 1.074 × 10⁹</td></tr>
<tr><td>terabyte (TB)</td><td>10¹²</td><td>tebibyte (TiB)</td><td>2⁴⁰ ≈ 1.100 × 10¹²</td></tr>
<tr><td>petabyte (PB)</td><td>10¹⁵</td><td>pebibyte (PiB)</td><td>2⁵⁰ ≈ 1.126 × 10¹⁵</td></tr>
</tbody>
</table>
<p>The drift is exponential: KB and KiB differ by 2.4%, MB and MiB by 4.9%, GB and GiB by 7.4%, TB and TiB by ~10%. The bigger the unit, the bigger the gap. A 1 TB drive (1,000,000,000,000 bytes) is reported as ~931 GiB by Windows.</p>
<h3>Who shows what</h3>
<table class="ref-table">
<thead><tr><th>System</th><th>Default display</th><th>Notes</th></tr></thead>
<tbody>
<tr><td>Windows (Explorer)</td><td>Binary, but labels "GB"</td><td>Reports 1 GiB and calls it 1 GB. The single biggest cause of confusion.</td></tr>
<tr><td>macOS (Finder, since 10.6 Snow Leopard)</td><td>Decimal SI</td><td>1 GB = 10⁹ bytes. Matches drive vendor numbers.</td></tr>
<tr><td>Linux (most distros)</td><td>Mixed; <code>du -h</code> uses binary, <code>du -h --si</code> uses decimal</td><td>Coreutils respects <code>POSIXLY_CORRECT</code> env var.</td></tr>
<tr><td>iOS / Android (Settings → Storage)</td><td>Decimal SI</td><td>Aligns with Apple/Samsung marketing copy.</td></tr>
<tr><td>Drive / RAM manufacturers</td><td>Decimal for drives, binary for RAM</td><td>RAM is sized in powers of 2 (8 GiB, 16 GiB) but labeled "GB".</td></tr>
<tr><td>Cloud storage (S3, GCS, Azure)</td><td>Decimal SI for billing</td><td>1 TB egress means 10¹² bytes, not 2⁴⁰.</td></tr>
<tr><td>Network (bandwidth)</td><td>Decimal SI, in <em>bits</em>, not bytes</td><td>"1 Gbps" = 10⁹ bits/s = 125 MB/s decimal.</td></tr>
</tbody>
</table>
<h3>The lawsuit history — why drive vendors switched</h3>
<p>Through the 1990s, hard-drive vendors freely mixed decimal and binary in marketing. After multiple US class-action suits (notably <em>Cho v. Seagate</em>, 2007), the industry standardized on decimal SI for capacity claims and added explicit fine print. This is also why Apple changed Finder in macOS 10.6 (2009) to display decimal — to match what users see on the box.</p>
<p>Windows still shows binary with "GB" labels (technically wrong by IEC standards) for backward compatibility. Microsoft has acknowledged the issue but has never changed it.</p>
<h3>Bits vs bytes — network bandwidth confusion</h3>
<p>Networking has always used <strong>bits</strong>, storage has always used <strong>bytes</strong>. 1 byte = 8 bits, so a "1 Gbps" connection delivers 125 MB/s in decimal terms — never 1 GB/s. The distinction matters every time someone says "I have a 1 Gig connection but my download speed is only 100 MB/s":</p>
<ul>
<li>1 Gbps (Gigabit per second) = 10⁹ bits/s = 125 × 10⁶ bytes/s = ~125 MB/s decimal.</li>
<li>1 GB/s (Gigabyte per second) = 10⁹ bytes/s = 8 × 10⁹ bits/s = 8 Gbps.</li>
</ul>
<p>The "MB" in "100 MB/s download speed" you see in browsers is decimal MB (10⁶ bytes). The "MB" in "1 GB RAM" is binary MiB (2²⁰ bytes). Same letters, different meanings, no warning.</p>
<h3>Common storage benchmarks — actual byte counts</h3>
<table class="ref-table">
<thead><tr><th>Item</th><th>Bytes</th><th>Decimal (SI)</th><th>Binary (IEC)</th></tr></thead>
<tbody>
<tr><td>Tweet (280 chars UTF-8)</td><td>~280–840</td><td>—</td><td>—</td></tr>
<tr><td>Average web page (HTML, 2025)</td><td>~75 000</td><td>75 KB</td><td>~73 KiB</td></tr>
<tr><td>HD photo (JPEG, 4K)</td><td>~3 000 000</td><td>3 MB</td><td>~2.86 MiB</td></tr>
<tr><td>MP3 song (3 min, 320 kbps)</td><td>~7 200 000</td><td>7.2 MB</td><td>~6.87 MiB</td></tr>
<tr><td>HD movie (1 hour, H.264)</td><td>~1.4 × 10⁹</td><td>1.4 GB</td><td>~1.30 GiB</td></tr>
<tr><td>4K UHD movie (2 hours)</td><td>~50 × 10⁹</td><td>50 GB</td><td>~46.6 GiB</td></tr>
<tr><td>Wikipedia text dump (English, 2026)</td><td>~22 × 10⁹</td><td>22 GB</td><td>~20.5 GiB</td></tr>
<tr><td>Netflix's video library (estimate)</td><td>~3 × 10¹⁵</td><td>3 PB</td><td>~2.66 PiB</td></tr>
</tbody>
</table>
<h3>Programming language conventions</h3>
<table class="ref-table">
<thead><tr><th>Language / API</th><th>What "1 MB" means</th></tr></thead>
<tbody>
<tr><td>Java <code>1_000_000L</code></td><td>Decimal — explicit literal.</td></tr>
<tr><td>Java <code>FileUtils.byteCountToDisplaySize</code></td><td>Binary (KB = 1024) — Apache Commons treats KB as KiB.</td></tr>
<tr><td>Node.js <code>fs.statSync(file).size</code></td><td>Returns bytes; conversion is your job.</td></tr>
<tr><td>Python <code>os.path.getsize</code></td><td>Returns bytes.</td></tr>
<tr><td>Linux <code>du -BM</code></td><td>Binary mebibytes; <code>du --si -BM</code> for decimal.</td></tr>
<tr><td>AWS S3 <code>Content-Length</code></td><td>Bytes; AWS billing uses decimal GB.</td></tr>
<tr><td>Docker <code>docker stats</code></td><td>Mixed historically; recent versions use binary KiB/MiB consistently.</td></tr>
</tbody>
</table>
<h3>Common byte-conversion mistakes</h3>
<ul>
<li><strong>Calling KiB "KB" in user-facing copy.</strong> Use the actual unit; users notice when their 256 GB phone shows 238 GB available.</li>
<li><strong>Mixing units in dashboards.</strong> If your CDN reports decimal GB and your origin reports binary GiB, a "100% match" looks like 7% drift.</li>
<li><strong>Storing sizes as "5 MB" strings instead of integers.</strong> Always store bytes; format on display.</li>
<li><strong>Confusing megabits and megabytes when reading speeds.</strong> A "100 Mbps" link delivers 12.5 MB/s, not 100.</li>
<li><strong>Forgetting that drive size includes filesystem overhead.</strong> A 1 TB drive provides 1 TB of <em>raw</em> capacity; ext4/NTFS/APFS each consume 0.5–3% for journaling, indexes, and reserved blocks.</li>
<li><strong>Calculating monthly bandwidth in GB but pricing in GiB.</strong> Cloud invoices and your monitoring graphs disagree by 7%; the gap compounds at terabyte scale.</li>
</ul>
<aside class="article-aside">
<strong>Authoritative references:</strong>
<ul>
<li><a href="https://www.iec.ch/si/binary.htm" rel="noopener" target="_blank">IEC 80000-13 — Binary prefixes (KiB, MiB, GiB...)</a></li>
<li><a href="https://physics.nist.gov/cuu/Units/binary.html" rel="noopener" target="_blank">NIST — Prefixes for Binary Multiples</a></li>
<li><a href="https://en.wikipedia.org/wiki/Binary_prefix" rel="noopener" target="_blank">Wikipedia — Binary prefix history</a></li>
<li><a href="https://en.wikipedia.org/wiki/JEDEC_memory_standards" rel="noopener" target="_blank">JEDEC memory standards (RAM uses binary GB)</a></li>
<li><a href="https://support.apple.com/en-us/102119" rel="noopener" target="_blank">Apple — Macs report storage in decimal (Snow Leopard change)</a></li>
</ul>
</aside>
</section>
<section class="faq-section">
<h2>Frequently Asked Questions</h2>
<div class="faq-item"><div class="faq-q" onclick="toggleFaq(this)">What is the difference between KB and KiB (binary vs decimal)?<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg></div><div class="faq-a"><strong>KB</strong> (kilobyte) uses the SI decimal standard: 1 KB = 1,000 bytes. <strong>KiB</strong> (kibibyte) uses the IEC binary standard: 1 KiB = 1,024 bytes. The distinction matters because storage manufacturers use decimal (making drives appear larger), while operating systems traditionally use binary (showing less usable space). The IEC introduced binary prefixes (KiB, MiB, GiB) in 1998 to eliminate this confusion.</div></div>
<div class="faq-item"><div class="faq-q" onclick="toggleFaq(this)">How many bytes are in a gigabyte?<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg></div><div class="faq-a">In decimal (SI): <strong>1 GB = 1,000,000,000 bytes</strong> (10<sup>9</sup>). In binary (IEC): <strong>1 GiB = 1,073,741,824 bytes</strong> (2<sup>30</sup>). The difference is about 7.4%. For a 500 GB hard drive, that translates to roughly 35 GB of apparent "missing" space when your OS reports in GiB.</div></div>
<div class="faq-item"><div class="faq-q" onclick="toggleFaq(this)">Why does my hard drive show less space than advertised?<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg></div><div class="faq-a">Drive manufacturers measure in decimal gigabytes (1 GB = 1 billion bytes) because it yields larger numbers for marketing. Windows displays sizes in binary gibibytes (1 GiB = 1,073,741,824 bytes). So a 1 TB drive (1,000,000,000,000 bytes) shows as ~931 GiB in Windows. macOS switched to decimal display in 2009, so Macs show the advertised capacity.</div></div>
</section>
<section class="related-section">
<h2>Related Tools</h2>
<div class="related-grid">
<a class="related-card" href="number-base"><div class="related-icon">01</div><div class="related-card-info"><div class="related-card-name">Number Base Converter</div><div class="related-card-desc">Binary, octal, decimal, hex</div></div></a>
<a class="related-card" href="unix-timestamp-converter"><div class="related-icon">⏱</div><div class="related-card-info"><div class="related-card-name">UNIX Timestamp</div><div class="related-card-desc">Convert timestamps and dates</div></div></a>
<a class="related-card" href="hex-to-rgb"><div class="related-icon">🎨</div><div class="related-card-info"><div class="related-card-name">Hex to RGB</div><div class="related-card-desc">Convert hex colors to RGB</div></div></a>
</div>
</section>
<section class="all-tools-section" aria-label="Browse all FreeDevTool developer tools">
<h2>Browse all 50 free developer tools</h2>
<p class="atc-sub">All tools run in your browser, no signup required, nothing sent to a server.</p>
<div class="all-tools-grid">
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">b64</div>
<div class="atc-cat-title"><h3>Encoding & Conversion</h3><span class="atc-cat-count">11 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/base64-encoder">Base64 Encoder / Decoder</a></li>
<li><a href="/base64-image">Image to Base64</a></li>
<li><a href="/byte-converter">Byte Converter (KB / MB / GB)</a></li>
<li><a href="/case-converter">Case Converter</a></li>
<li><a href="/hex-to-rgb">Hex to RGB / HSL</a></li>
<li><a href="/html-entity">HTML Entity Encoder</a></li>
<li><a href="/json-to-csv">JSON to CSV Converter</a></li>
<li><a href="/px-to-rem">PX to REM Converter</a></li>
<li><a href="/string-escape">String Escape / Unescape</a></li>
<li><a href="/url-encoder">URL Encoder / Decoder</a></li>
<li><a href="/yaml-to-json">YAML to JSON Converter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">{ }</div>
<div class="atc-cat-title"><h3>Formatting & Generators</h3><span class="atc-cat-count">13 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/color-name">Color Name from Hex</a></li>
<li><a href="/color-picker">Color Palette Picker</a></li>
<li><a href="/css-box-shadow">CSS Box Shadow</a></li>
<li><a href="/css-gradient">CSS Gradient Generator</a></li>
<li><a href="/json-formatter">JSON Formatter / Validator</a></li>
<li><a href="/lorem-ipsum">Lorem Ipsum Generator</a></li>
<li><a href="/markdown-preview">Markdown Preview</a></li>
<li><a href="/password-generator">Password Generator</a></li>
<li><a href="/qr-generator">QR Code Generator</a></li>
<li><a href="/sql-formatter">SQL Formatter</a></li>
<li><a href="/uuid-generator">UUID Generator</a></li>
<li><a href="/word-to-markdown">Word to Markdown</a></li>
<li><a href="/xml-formatter">XML Formatter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">JS</div>
<div class="atc-cat-title"><h3>Minifiers & DevOps</h3><span class="atc-cat-count">6 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/chmod-calculator">chmod Calculator</a></li>
<li><a href="/cron-parser">Cron Expression Parser</a></li>
<li><a href="/css-minifier">CSS Minifier</a></li>
<li><a href="/html-minifier">HTML Minifier</a></li>
<li><a href="/js-minifier">JavaScript Minifier</a></li>
<li><a href="/http-status">HTTP Status Codes</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">#</div>
<div class="atc-cat-title"><h3>Security & Hashing</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/hash-generator">Hash Generator (MD5, SHA)</a></li>
<li><a href="/jwt-decoder">JWT Decoder</a></li>
<li><a href="/jwt-generator">JWT Generator</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">.*</div>
<div class="atc-cat-title"><h3>Code & Text</h3><span class="atc-cat-count">8 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/ai-token-counter">AI Token Counter</a></li>
<li><a href="/char-counter">Character & Word Counter</a></li>
<li><a href="/git-cheatsheet">Git Commands Cheatsheet</a></li>
<li><a href="/number-base">Number Base Converter</a></li>
<li><a href="/regex-explainer">Regex Explainer</a></li>
<li><a href="/regex-tester">Regex Tester</a></li>
<li><a href="/text-diff">Text Diff Checker</a></li>
<li><a href="/wcag-contrast">WCAG Contrast Checker</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">IP</div>
<div class="atc-cat-title"><h3>Network & APIs</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/dns-lookup">DNS Lookup</a></li>
<li><a href="/http-request-builder">HTTP Request Builder</a></li>
<li><a href="/ip-lookup">IP Address Lookup</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">⏱</div>
<div class="atc-cat-title"><h3>Time & Dates</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/relative-time">Relative Time Calculator</a></li>
<li><a href="/timestamp-diff">Timestamp Diff</a></li>
<li><a href="/unix-timestamp-converter">Unix Timestamp Converter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">SEO</div>
<div class="atc-cat-title"><h3>SEO & Meta</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/meta-tag-generator">Meta Tag Generator</a></li>
<li><a href="/og-preview">Open Graph Preview</a></li>
<li><a href="/slug-generator">URL Slug Generator</a></li>
</ul>
</div>
</div>
</section>
</div>
<footer>
<div>© 2026 FreeDevTool. Built for developers, by developers.</div>
<div class="footer-links"><a href="/all-tools">All Tools</a><a href="/about">About</a><a href="/privacy">Privacy Policy</a><a href="/terms">Terms of Use</a></div>
</footer>
<script>
const units={
bit:{bytes:1/8,label:'Bits',full:'Bit'},
b:{bytes:1,label:'Bytes',full:'Byte'},
kb:{bytes:1e3,label:'KB',full:'Kilobyte (10³)'},
kib:{bytes:1024,label:'KiB',full:'Kibibyte (2¹⁰)'},
mb:{bytes:1e6,label:'MB',full:'Megabyte (10⁶)'},
mib:{bytes:Math.pow(1024,2),label:'MiB',full:'Mebibyte (2²⁰)'},
gb:{bytes:1e9,label:'GB',full:'Gigabyte (10⁹)'},
gib:{bytes:Math.pow(1024,3),label:'GiB',full:'Gibibyte (2³⁰)'},
tb:{bytes:1e12,label:'TB',full:'Terabyte (10¹²)'},
tib:{bytes:Math.pow(1024,4),label:'TiB',full:'Tebibyte (2⁴⁰)'},
pb:{bytes:1e15,label:'PB',full:'Petabyte (10¹⁵)'},
pib:{bytes:Math.pow(1024,5),label:'PiB',full:'Pebibyte (2⁵⁰)'},
eb:{bytes:1e18,label:'EB',full:'Exabyte (10¹⁸)'},
eib:{bytes:Math.pow(1024,6),label:'EiB',full:'Exbibyte (2⁶⁰)'}
};
function fmt(n){
if(n===0)return'0';
if(n>=1e15)return n.toExponential(4);
if(n<0.001&&n>0)return n.toExponential(4);
if(Number.isInteger(n)&&n<1e15)return n.toLocaleString('en-US');
const s=n.toPrecision(10);
return parseFloat(s).toLocaleString('en-US',{maximumFractionDigits:6});
}
function convert(){
const val=parseFloat(document.getElementById('byte-input').value)||0;
const unit=document.getElementById('byte-unit').value;
const bytes=val*units[unit].bytes;
const decimalUnits=['bit','b','kb','mb','gb','tb','pb','eb'];
const binaryUnits=['kib','mib','gib','tib','pib','eib'];
let html='<div class="byte-section-label">Decimal (SI) Units</div>';
decimalUnits.forEach(u=>{
const v=bytes/units[u].bytes;
html+=`<div class="byte-row"><div class="byte-label">${units[u].label}<span class="full">${units[u].full}</span></div><div class="byte-value" onclick="copyVal('${fmt(v)}')" title="Click to copy">${fmt(v)}</div></div>`;
});
html+='<div class="byte-section-label">Binary (IEC) Units</div>';
binaryUnits.forEach(u=>{
const v=bytes/units[u].bytes;
html+=`<div class="byte-row"><div class="byte-label">${units[u].label}<span class="full">${units[u].full}</span></div><div class="byte-value" onclick="copyVal('${fmt(v)}')" title="Click to copy">${fmt(v)}</div></div>`;
});
document.getElementById('byte-results').innerHTML=html;
}
function setPreset(val,unit){
document.getElementById('byte-input').value=val;
document.getElementById('byte-unit').value=unit;
convert();
}
function copyVal(v){
navigator.clipboard.writeText(v.replace(/,/g,''));
const t=document.getElementById('toast');t.style.opacity='1';setTimeout(()=>t.style.opacity='0',1500);
}
document.getElementById('byte-input').addEventListener('input',convert);
document.getElementById('byte-unit').addEventListener('change',convert);
convert();
function toggleFaq(el){el.parentElement.classList.toggle('open');}
</script>
</body>
</html>