A fresh mix of code snippets and tutorials

Quick KB/MB unit conversions

Working with .htaccess for stuff like file uploads, it’s frequently necessary to convert between kilobytes and megabytes.

I know there are a million online resources for this, but really it’s better for me to just have the stuff I’m looking for on my own domains. Like owning a toaster instead of always going next to borrow your neighbors.

Here are the KB/MB unit conversions that I use the most. More will be added as they become necessary for projects, etc.

75 Kilobytes = 75776 bytes
80 Kilobytes = 81920 bytes

1 Megabyte    = 1048576 bytes
5 Megabytes   = 5242880 bytes
10 Megabytes  = 10485760 bytes
20 Megabytes  = 20971520 bytes
50 Megabytes  = 52428800 bytes
100 Megabytes = 104857600 bytes

Rock on.

Learn more

.htaccess made easy