Free · Programmer-friendly · Both standards · No upload

Bytes to MB Converter — Convert Bytes to Megabytes (Both Standards)

Convert any byte value to megabytes under both standards at once — decimal MB (divide by 1,000,000) and binary MiB (divide by 1,048,576). Built for programmers and sysadmins working with values from code, APIs, log files, and databases. Includes one-click access to the power-of-two values you actually see in code — 1024, 1048576, 4194304, 10485760 and more — plus reference tables for PHP, MySQL, and HTTP byte limits.
💻 Programmer quick-picks 🔢 1,000,000 vs 1,048,576 both shown 📊 Bit / byte visualizer 📚 PHP · MySQL · HTTP limits 🔒 Runs in your browser
SI Decimal answer
1 MB = 1,000,000 bytes
The SI definition used by drive labels, cloud storage dashboards, and consumer-facing byte counts. Rarely what your code means.
IEC Binary answer
1 MiB = 1,048,576 bytes
The binary definition (2^20) used by Python, JavaScript, PHP, MySQL, Windows File Explorer, and most programming contexts. This is what "MB" almost always means in code.
Byte values you actually see in code Click any to load

Bytes to MB Converter

Paste a byte value from code, an API response, a log file, or a database — get MB instantly.
— —
Drop a file to read its exact byte count
The browser reads the file's size property in bytes and fills the input automatically. The file itself is never opened or uploaded.
📎 Drag & drop 👆 Click to browse 📋 Paste from clipboard 🔒 Nothing uploaded
Enter bytes
1 MiB = 1,048,576 bytes (binary)
Quick:
1,048,576 bytes equals
1MiB
or 1.048576 MB (decimal standard)
Binary MiB is what your code almost always means — Python's sys.getsizeof, JavaScript's File.size, PHP's upload size checks, and MySQL's BLOB limits all use the binary value (1,048,576) even when the label says "MB".
Same value at every scale Bits · Bytes · KB · MB
Where this size sits on the byte spectrum
1 MB
1 MB
1 B 1 KB 1 MB 1 GB
Decimal vs binary — same value, two answers +4.86%
SI Decimal (÷ 1,000,000)
1.048576 MB
1.048576 MB
IEC Binary (÷ 1,048,576)
1 MiB
1 MiB
Both bars are scaled against the larger of the two answers, so the difference between them is visible. At the megabyte level the SI/IEC gap is 4.86 percent — small enough to ignore in casual work, large enough to break exact-match assertions in tests.
Same value in every unit
Click any cell to copy
🧮 Show the formula
Decimal (SI): MB = bytes ÷ 1,000,000 Binary (IEC): MiB = bytes ÷ 1,048,576 Reverse: bytes = MB × 1,000,000 (decimal) bytes = MiB × 1,048,576 (binary)

Byte → MB Reference — Power-of-Two Values

The exact byte values programmers encounter most, with both MB standards.
BytesPower of twoMiB (binary ÷ 1,048,576)MB (decimal ÷ 1,000,000)Common context
1,0242^100.000977 MiB0.001024 MB1 KiB — smallest binary block size
65,5362^160.0625 MiB0.065536 MBMySQL BLOB limit · 64 KiB block
1,048,5762^201 MiB1.048576 MB1 MiB — Python's file size cutoff
2,097,1522^212 MiB2.097152 MBPHP default upload_max_filesize = 2M
4,194,3042^224 MiB4.194304 MB4 MiB — many PHP/Java buffer limits
5,242,8805×2^205 MiB5.24288 MBCommon API upload limit
8,388,6082^238 MiB8.388608 MBPHP post_max_size = 8M default
10,485,76010×2^2010 MiB10.48576 MBPHP upload_max_filesize = 10M
16,777,2162^2416 MiB16.777216 MBWhatsApp media limit · MySQL MEDIUMBLOB
26,214,40025×2^2025 MiB26.2144 MBGmail attachment limit (25 MB)
52,428,80050×2^2050 MiB52.4288 MBLarge file upload tier
104,857,600100×2^20100 MiB104.8576 MBMedia processing ceilings
134,217,7282^27128 MiB134.217728 MBPHP memory_limit = 128M default
268,435,4562^28256 MiB268.435456 MBPHP memory_limit = 256M common
1,073,741,8242^301,024 MiB (1 GiB)1,073.741824 MB1 GiB — 32-bit address limit

Common Byte Limits — PHP, MySQL, HTTP

The exact byte counts behind the "MB" values you see in config files.
SettingValue as writtenExact bytesNotes
PHP upload_max_filesize2M (default)2,097,1522 × 2^20 · default for most PHP installs
PHP upload_max_filesize8M (common)8,388,6088 × 2^20 · often set by shared hosts
PHP upload_max_filesize10M (common)10,485,76010 × 2^20 · WordPress-friendly
PHP upload_max_filesize64M67,108,86464 × 2^20 · for large media uploads
PHP post_max_size8M (default)8,388,608Must be ≥ upload_max_filesize
PHP memory_limit128M (default)134,217,728128 × 2^20 · per-request memory ceiling
PHP memory_limit256M (common)268,435,456256 × 2^20 · recommended for Magento/Drupal
PHP memory_limit512M536,870,912512 × 2^20 · heavy WordPress/plugins
MySQL TINYBLOB255 bytes255Largest value is 2^8 - 1 bytes
MySQL BLOB64 KiB65,535Largest value is 2^16 - 1 bytes
MySQL MEDIUMBLOB16 MiB16,777,215Largest value is 2^24 - 1 bytes
MySQL LONGBLOB4 GiB4,294,967,295Largest value is 2^32 - 1 bytes
PostgreSQL bytea1 GB1,073,741,824Practical limit depends on TOAST storage
HTTP header (typical)8 KB8,192Most servers reject requests with longer headers
URL (Internet Explorer legacy)2,083 chars~2,083Modern browsers accept far longer
S3 single PUT object5 GB5,368,709,120Multipart upload removes the limit

MB → Bytes Reverse Reference

When you need to know "5 MB — but how many bytes exactly?"
ValueDecimal bytes (× 1,000,000)Binary bytes (× 1,048,576)Difference
1 MB1,000,0001,048,57648,576
2 MB2,000,0002,097,15297,152
5 MB5,000,0005,242,880242,880
8 MB8,000,0008,388,608388,608
10 MB10,000,00010,485,760485,760
16 MB16,000,00016,777,216777,216
25 MB25,000,00026,214,4001,214,400
50 MB50,000,00052,428,8002,428,800
100 MB100,000,000104,857,6004,857,600
128 MB128,000,000134,217,7286,217,728
256 MB256,000,000268,435,45612,435,456
500 MB500,000,000524,288,00024,288,000
1 GB1,000,000,0001,073,741,82473,741,824

Direct Answers to Common Questions

The exact queries this page is built to answer, with both decimal and binary results.
QuestionDecimal (SI)Binary (IEC)
How many bytes in 1 MB?1,000,000 bytes1,048,576 bytes
1024 bytes to MB0.001024 MB1 KiB (0.000977 MiB)
1048576 bytes to MB1.048576 MB1 MiB
2097152 bytes to MB2.097152 MB2 MiB
4194304 bytes to MB4.194304 MB4 MiB
5242880 bytes to MB5.24288 MB5 MiB
8388608 bytes to MB8.388608 MB8 MiB
10485760 bytes to MB10.48576 MB10 MiB
16777216 bytes to MB16.777216 MB16 MiB
26214400 bytes to MB26.2144 MB25 MiB
52428800 bytes to MB52.4288 MB50 MiB
104857600 bytes to MB104.8576 MB100 MiB
134217728 bytes to MB134.217728 MB128 MiB
1000000 bytes to MB1 MB0.9537 MiB
5000000 bytes to MB5 MB4.7684 MiB
10000000 bytes to MB10 MB9.5367 MiB
1 GB in bytes1,000,000,000 bytes1,073,741,824 bytes
1 TB in bytes1,000,000,000,000 bytes1,099,511,627,776 bytes

What this bytes to MB calculator does

Paste a byte value from anywhere — a Python os.path.getsize() return, a JavaScript File.size property, a MySQL BLOB length, an HTTP Content-Length header, a log line, or a database dump — and this calculator converts it to megabytes under both standards at once. The decimal answer divides by 1,000,000; the binary answer divides by 1,048,576. The two are about 4.86 percent apart, and knowing which one you actually mean matters more often than most people realise.

What makes this page different from a generic byte converter is that it is aimed squarely at the audience that actually has byte values: developers and sysadmins. Every default in the tool reflects that. The initial byte value is 1048576 — the exact 2^20 power-of-two value that Python, JavaScript, PHP, and MySQL all recognise as "1 MB" internally. The quick-pick panel is packed with the byte values that appear in real code — 4194304, 10485760, 5242880, 26214400, 104857600. The reference tables below the tool list the exact byte counts behind every PHP, MySQL, PostgreSQL, and HTTP size limit you are likely to hit.

If you have a byte value and need to know what it means in MB, this is the fastest path. If you have a MB value and need the byte count for a config file, the reverse tabs and lookup tables handle that too.

How to use it

  1. Paste your byte value. Type or paste a byte count into the input field. The result updates as you type — no need to press a convert button.
  2. Or click a power-of-two quick-pick. The panel above the tool has the byte values that appear in real code — 1024, 1048576, 4194304, 5242880, 10485760, 26214400, 104857600. One click loads them.
  3. Or drop a file. Drag any file onto the dashed drop zone and the browser reads its exact byte count using the File API. Useful when you want to verify a file's size against a byte limit.
  4. Read both answers. The large number is the primary answer in the standard that matches your input. The line beneath shows the alternate standard so you can see exactly how far apart they are.
  5. Check the bit/byte visualizer. The panel below the result shows the same value in bits, bytes, KB (decimal and binary), and MB (decimal and binary). Useful when you are working at the boundary between bits and bytes — network throughput, storage, or memory allocation.
  6. Use the reference tables. If you are setting a PHP upload limit or checking a MySQL BLOB size, the tables below the tool list every common limit with its exact byte count.
  7. Swap direction if needed. The MB → Bytes tab flips the converter so you can start from a MB value and find the byte count for your config file.

Why most byte values you see in code are powers of two

If you have spent any time in a codebase that handles file sizes, uploads, or memory, you have noticed something: the byte values are almost always suspiciously round in binary but messy in decimal. Values like 4,194,304 — which looks arbitrary in decimal — turn out to be exactly 2^22. Values like 10,485,760 are exactly 10 × 2^20. And the reason is simple: computers address memory in binary.

A system with N address lines can address 2^N unique bytes. Twenty address lines give you 1,048,576 bytes. Thirty give you 1,073,741,824 — one gibibyte. Because the underlying hardware is binary, the operating systems and programming languages that run on top of it inherit those round numbers. When a language designer writes "default buffer size: 4 MB", they almost certainly mean 4 × 2^20 = 4,194,304 bytes, not 4,000,000.

That is why the byte values in your code look the way they do. Here are the ones that come up most often:

Power of twoBytesWhy it matters
2^101,0241 KiB — the base binary block size
2^1665,536MySQL BLOB max, TCP window sizes, some hardware buffers
2^201,048,5761 MiB — Python's default file-size cutoff, MySQL TEXT column limit
2^2416,777,21616 MiB — WhatsApp media, PHP's default max in many hosts, MySQL MEDIUMBLOB
2^27134,217,728128 MiB — default PHP memory_limit for many installs
2^301,073,741,8241 GiB — the 32-bit address limit
2^312,147,483,6482 GiB — the classic signed 32-bit integer limit; breaks many older file-size APIs
2^324,294,967,2964 GiB — the unsigned 32-bit ceiling; MySQL LONGBLOB max is 2^32 - 1
2^401,099,511,627,7761 TiB — the classic binary terabyte

The practical upshot: when you see a byte value in code that looks suspiciously like 4,194,304 or 268,435,456, it is almost certainly a power of two. Divide by 1,048,576 to get the exact mebibyte count — 4 MiB or 256 MiB respectively — and you will match the intent of the original author. Divide by 1,000,000 instead and you get a slightly different number (4.194304 MB) that will not match any assert statement.

Bits, bytes, and the factor-of-8 trap

The single most common source of bugs in network code is forgetting that a byte is 8 bits. Every byte count has a matching bit count — just multiply by 8 — and every bit rate has a matching byte rate — divide by 8. This matters every time you compare a network throughput figure against a file size.

  • A 100 Mbps internet connection downloads 12.5 MB per second, not 100. Divide the Mbps figure by 8 to get MB/s.
  • A 1 Gbps fibre connection downloads 125 MB per second.
  • A 10 Gbps datacentre link transfers 1,250 MB per second — a 1 TB file takes about 14 minutes at sustained throughput.
  • A 25 Mbps upload speed sends 3.125 MB per second — a 1 GB backup uploads in about 5 minutes 20 seconds.

The bits-vs-bytes distinction also shows up in storage calculations. RAM is measured in bytes, but RAM chips are physically built as arrays of bits, and their internal bandwidth is quoted in bits per second. When you see "DDR4-3200", the "3200" refers to 3,200 million transfers per second — but each transfer moves 8 bytes on a standard 64-bit memory bus, so the effective bandwidth is 25,600 MB/s. The factor of 8 is everywhere once you start looking.

PHP, MySQL, and HTTP — the byte limits that actually break things

Most byte-to-MB conversions in a developer's life come from hitting a size limit and needing to know what the number actually means. Here are the ones that come up most, with their exact byte counts.

PHP upload and memory limits

PHP uses the shorthand suffixes K, M, and G in its php.ini file, and those suffixes are binary — M means 1,048,576 bytes, not 1,000,000. So the following are the exact byte counts behind the common settings:

  • upload_max_filesize = 2M means 2,097,152 bytes (2 MiB)
  • upload_max_filesize = 8M means 8,388,608 bytes (8 MiB)
  • upload_max_filesize = 10M means 10,485,760 bytes (10 MiB)
  • post_max_size = 8M means 8,388,608 bytes — and it must always be ≥ upload_max_filesize
  • memory_limit = 128M means 134,217,728 bytes (128 MiB)
  • memory_limit = 256M means 268,435,456 bytes (256 MiB)

The classic WordPress problem — "the uploaded file exceeds the upload_max_filesize directive in php.ini" — happens when a user tries to upload a file whose byte count exceeds the configured limit. Knowing the exact byte count of the limit is the difference between a five-minute fix and an hour of debugging.

MySQL BLOB and TEXT limits

MySQL has four BLOB sizes and four matching TEXT sizes, and each one has a hard byte ceiling imposed by the column type:

  • TINYBLOB / TINYTEXT — 255 bytes (2^8 - 1)
  • BLOB / TEXT — 65,535 bytes (2^16 - 1)
  • MEDIUMBLOB / MEDIUMTEXT — 16,777,215 bytes (2^24 - 1)
  • LONGBLOB / LONGTEXT — 4,294,967,295 bytes (2^32 - 1)

The -1 in each of those formulas is why MySQL's BLOB limits are one byte less than the corresponding power of two. A BLOB column can hold up to 65,535 bytes, not 65,536, because MySQL reserves one value of the byte count for NULL handling.

HTTP and URL limits

  • HTTP header size — most servers reject requests with total headers over 8 KB (8,192 bytes). Nginx defaults to large_client_header_buffers 4 8k; Apache defaults to 8,190 bytes per header.
  • URL length — most modern browsers accept URLs up to about 2,000 characters, though the actual limit depends on the browser and the server. Apache defaults to 8,177 characters; IIS defaults to 16,384.
  • POST body size — set by the server, not by HTTP itself. Nginx defaults to client_max_body_size 1m (1 MiB); Apache is usually configured in PHP via post_max_size.

Bytes to MB in Python, JavaScript, PHP, and SQL

Different languages have different conventions for byte-to-MB conversion, and getting it wrong can cause bugs that only surface at specific file sizes. Here is the reference for the languages you are most likely to be working in.

LanguageDecimal conversionBinary conversionWhich one is common
Pythonbytes / 1_000_000bytes / 1_048_576Binary, labelled as "MB" (e.g. humanize, tqdm)
JavaScriptbytes / 1_000_000bytes / 1_048_576Binary for File.size display
PHPbytes / 1000000bytes / 1048576Binary for ini_get('upload_max_filesize')
Javabytes / 1_000_000Lbytes / 1_048_576LBinary for File.length() display
Gobytes / 1e6bytes / 1048576Binary in most logging libraries
C#/.NETbytes / 1_000_000Dbytes / 1_048_576DBinary in System.IO file size display
SQL (MySQL)bytes / 1000000bytes / 1048576Binary for LENGTH() on BLOB columns

In every one of those languages, the safer choice for user-facing file-size display is the binary conversion (÷ 1,048,576) with an "MB" label. That matches what Windows File Explorer and macOS Finder show. If you are writing to a spec that says "megabytes" in the SI sense — a drive label, a cloud storage quota, a mobile data plan — use the decimal conversion instead.

Where bytes to MB conversion actually matters

  • Debugging an upload failure. When a user's upload fails with a size-limit error, the exact byte count tells you whether the file exceeds the limit by 100 bytes or 100 MB — a very different fix.
  • Configuring PHP limits. Setting upload_max_filesize requires knowing the exact byte count behind the "M" suffix.
  • Writing a size-limit check in code. If your API caps uploads at 10 MB, do you mean 10,000,000 bytes or 10,485,760 bytes? The answer affects which files are accepted.
  • Testing size limits in unit tests. Assertions on file size need to match the exact binary value your code uses, not a decimal approximation.
  • Reading a Content-Length header. HTTP responses report sizes in bytes; you usually want to know if that is 1 MB or 10 MB.
  • Analyzing log files. Log rotation thresholds, request size limits, and error thresholds are all written in bytes internally.
  • Sizing a database column. Choosing between BLOB and MEDIUMBLOB depends on knowing the byte count of your typical data.
  • Estimating transfer time. A network throughput figure in bits per second divided by 8 gives bytes per second; that divided into a file size in bytes gives seconds.
  • Comparing cloud storage bills. AWS S3, Azure Blob, and Backblaze all bill in decimal GB — so a "1 GB" file in your local Python code is not the same as a "1 GB" file in S3's billing.

Common mistakes and how to avoid them

  • Mixing binary and decimal within a calculation. If you read a file size in binary from Windows and then compute a percentage against a decimal GB quota, the answer will be off by about 7 percent. Pick one standard and stick to it.
  • Assuming 1 MB = 1,000,000 bytes in code. Almost every programming environment uses the binary value internally, even when the label says "MB". Defaulting to 1,000,000 will cause silent bugs when you compare against a real file size.
  • Confusing bytes and bits. Network speeds are in bits per second. File sizes are in bytes. A 100 Mbps connection downloads 12.5 MB per second, not 100. Always divide by 8.
  • Forgetting that PHP's ini suffixes are binary. upload_max_filesize = 10M means 10,485,760 bytes, not 10,000,000. If you write a client-side file-size check that uses the decimal value, it will reject files that the server would actually accept.
  • Assuming BLOB limits are power-of-two. MySQL's BLOB maxes are 2^N minus 1, not 2^N, because one byte count value is reserved. BLOB holds 65,535 bytes, not 65,536.
  • Trusting a URL bar byte count. Modern browsers do not display byte counts in the URL bar, but many browser extensions do, and they disagree on which standard to use. Always check the tool's own documentation.
  • Using the same conversion for both file sizes and network data. File sizes are bytes; network throughput is bits. If you confuse the two, you will be off by a factor of 8.
  • Rounding too early. If you are chaining conversions — bytes → KB → MB → GB — do the full multiplication or division in a single step and round at the end. Rounding at each stage compounds the error.
  • Assuming the byte count is always exact. Filesystem metadata, compression, and encoding can all change the effective size. A 1,048,576-byte file on disk might take 1,052,672 bytes of actual disk space due to block rounding.

Privacy and data handling

Every calculation happens inside your browser. Nothing you type is uploaded, logged, cached, or stored on any server. If you drop a file onto the drop zone, the browser reads only the file's .size property — a single integer the operating system already knows. The file's contents are never opened, decoded, or sent anywhere. Recent values are stored only in your browser's local storage so the tool can offer them back to you, and can be cleared with the button on the page. There is no account, no login, and no network request after the page loads.

Limitations to be aware of

  • The tool cannot detect which standard your source used. If you paste a value from a Windows File Explorer panel labelled "MB", that number is a binary MiB in disguise. Use the MiB input unit to be exact.
  • Display values are shown with up to 6 decimal places. For byte values below 1 MB, more digits may be needed — use the exact byte count or the raw division for full precision.
  • The bit/byte visualizer assumes standard 8-bit bytes. Some legacy systems use non-standard byte sizes (rare, but they exist in aerospace and industrial contexts).
  • The programming language reference assumes the standard library conventions. Some third-party libraries deviate — always check the documentation for the specific library you use.
  • The file drop zone reads size only. It does not open, preview, edit, convert, or process the file itself.
  • On rare occasions — iCloud "optimized storage" placeholders, OneDrive "files on-demand" items — the size the browser reports is the placeholder size, not the eventual downloaded size.
  • History is per-browser. It does not sync across devices, and clearing your browser's site data will wipe it.

Frequently asked questions

How do I convert bytes to MB?

Divide the number of bytes by 1,000,000 for the decimal (SI) answer, or by 1,048,576 for the binary (IEC) answer. For example, 5,242,880 bytes ÷ 1,048,576 = 5 MiB binary; 5,242,880 bytes ÷ 1,000,000 = 5.24288 MB decimal.

How many bytes in a megabyte?

1 MB = 1,000,000 bytes in the decimal (SI) standard used by storage manufacturers, ISPs, and cloud platforms. 1 MiB = 1,048,576 bytes in the binary (IEC) standard that Windows File Explorer, macOS Finder, and most programming languages use internally.

What is 1048576 bytes in MB?

1,048,576 bytes is exactly 1 MiB (binary) and 1.048576 MB (decimal). The value 1,048,576 is 2^20, which is why it is the most common byte value in programming — it represents exactly one mebibyte.

What is 4194304 bytes in MB?

4,194,304 bytes is exactly 4 MiB (binary) and 4.194304 MB (decimal). The value 4,194,304 is 2^22 — the classic 4 MiB boundary that appears in PHP upload limits, memory allocations, and file-system blocks.

What is 5242880 bytes in MB?

5,242,880 bytes is exactly 5 MiB (binary) and 5.24288 MB (decimal). The value 5,242,880 is 5 × 2^20 — a common file-size limit used by many APIs and web frameworks.

What is 10485760 bytes in MB?

10,485,760 bytes is exactly 10 MiB (binary) and 10.48576 MB (decimal). The value 10,485,760 is 10 × 2^20 — one of the most common upload-size limits in PHP (upload_max_filesize = 10M) and WordPress.

What is 104857600 bytes in MB?

104,857,600 bytes is exactly 100 MiB (binary) and 104.8576 MB (decimal). The value 104,857,600 is 100 × 2^20 — often used as the ceiling for large file uploads or media processing limits.

What is 26214400 bytes in MB?

26,214,400 bytes is exactly 25 MiB (binary) and 26.2144 MB (decimal). The value 26,214,400 is 25 × 2^20 — the classic 25 MiB attachment size that matches Gmail's limit expressed in binary.

Why are most byte values powers of two?

Because the underlying hardware addresses memory in binary. A system with 20 address lines can address 2^20 = 1,048,576 bytes. Programming languages and operating systems have historically defined their limits in terms of these power-of-two values, so a value like 10 MB usually means 10 × 1,048,576 = 10,485,760 bytes in a compiled program, not 10,000,000.

Is 1 MB equal to 1,000,000 bytes or 1,048,576 bytes?

Both are correct depending on context. 1 MB = 1,000,000 bytes under the SI standard. 1 MiB = 1,048,576 bytes under the IEC standard. Windows, macOS, and most programming languages use the binary value (1,048,576) but label it "MB". Storage manufacturers use the decimal value (1,000,000) — which is why a "500 GB" drive shows up as about 465 GiB in Windows.

How many bits in a byte?

8 bits in 1 byte. That means 1 MB contains 8,000,000 bits in decimal or 8,388,608 bits in binary. The bits-vs-bytes distinction is why a 100 Mbps internet connection downloads 12.5 MB per second rather than 100 — divide by 8.

What is the PHP upload_max_filesize in bytes?

PHP's upload_max_filesize uses the shorthand M and G suffixes, which are binary. So upload_max_filesize = 10M means 10 × 1,048,576 = 10,485,760 bytes exactly. The default is 2M (2,097,152 bytes). To change it, use values like 2M, 5M, 10M, 20M, 50M, 100M — each one is a multiple of 1,048,576 bytes.

What is the MySQL BLOB size in bytes?

MySQL has four BLOB sizes: TINYBLOB holds 255 bytes, BLOB holds 65,535 bytes (64 KiB), MEDIUMBLOB holds 16,777,215 bytes (16 MiB), and LONGBLOB holds 4,294,967,295 bytes (4 GiB). These values are the maximums, not the storage size — the actual storage is the size of the data you insert.

What is 1 TB in bytes?

1 TB = 1,000,000,000,000 bytes in decimal (SI). 1 TiB = 1,099,511,627,776 bytes in binary (IEC). 1 TiB is 2^40, one of the classic power-of-two boundaries.

What is 1 GB in bytes?

1 GB = 1,000,000,000 bytes in decimal. 1 GiB = 1,073,741,824 bytes in binary. 1 GiB is 2^30 — the value that appears in browser memory limits, JavaScript's maximum typed-array size, and 32-bit operating-system memory ceilings.

How do I convert bytes to MB in Python?

In Python: bytes_value / 1_000_000 gives decimal MB; bytes_value / 1_048_576 gives binary MiB. Python's standard library does not do automatic unit conversion; you have to choose. For file-size display, most applications use the binary version (÷ 1,048,576) with an "MB" label — matching what Windows Explorer shows.

How do I convert bytes to MB in JavaScript?

In JavaScript: bytes / 1_000_000 for decimal MB; bytes / 1_048_576 for binary MiB. The Node.js ecosystem typically uses the binary version for file sizes. Browsers use binary for the File API's size property and for navigator.deviceMemory.

How do I convert bytes to MB in Excel or Google Sheets?

Use =A1/1000000 for decimal MB, or =A1/1048576 for binary MiB. Excel also has the CONVERT function: =CONVERT(A1,"byte","Mbyte") for decimal or =CONVERT(A1,"byte","Mibyte") for binary.

Is a byte bigger than a bit?

Yes — 1 byte equals 8 bits. A bit is the smallest unit of information (a single 0 or 1), while a byte is the smallest addressable unit in most computer architectures. When you see internet speeds quoted in Mbps (megabits per second) and file sizes in MB (megabytes), the factor of 8 explains why a 100 Mbps connection downloads 12.5 MB per second.

What is 4194304 bytes in MB and why is it special?

4,194,304 bytes equals exactly 4 MiB (binary) or 4.194304 MB (decimal). The value is 2^22. It is special because it is the exact power-of-two value that 32-bit and 64-bit systems use for 4 MiB memory blocks — the maximum size of many historical application allocations, default buffer sizes, and old FAT filesystem limits.

Does this converter upload my data?

No. Every calculation runs in your browser using vanilla JavaScript. Nothing you type is uploaded, logged, or stored on any server. There is no account, no login, and no network request after the page loads.

Does this tool save my values?

Recent values are stored only in your browser's local storage so the tool can offer them back to you. You can clear them with one click on the page. Nothing is ever uploaded to a server.

How does this bytes to MB converter differ from other online converters?

Most byte-to-MB converters silently pick one standard. This one shows both decimal and binary answers side by side, provides one-click access to the power-of-two values programmers actually work with (1024, 1048576, 4194304, 10485760 and more), includes reverse lookup tables for MB-to-bytes, and references common PHP, MySQL, and HTTP byte limits.

Sources and methodology

Scroll to Top