Documentation such as Static Resources says:

A single static resource can be up to 5 MB in size. An organization can have up to 250 MB of static resources.

We have one growing static resource of size 4,950,663 bytes, so it would be good to know whether the limit is 5,242,880 bytes or 5,000,000 bytes.


1 Answer 1


It's 5,000,000 bytes. In Salesforce, all storage units are per SI units, where megabyte means 1,000,000, and mebibyte means 1,048,576. Nowhere in Salesforce are the SI units for kibibyte/mebibyte/gibibyte, etc used in the documentation explicitly. Good luck finding this explicitly mentioned in the documentation, but note that this trend is consistent across all such limits (6MB Apex code, 10MB Custom Settings, etc). The rare exception to this rule are the field size limits (e.g. 32KB is 32,767 characters).

  • Thanks and for the broadness of the answer too. So we only have 49,337 bytes to spare...
    – Keith C
    Apr 27, 2019 at 17:46
  • 2
    As an addendum, this tends to be a general rule -- kibibytes are technically written KiB, mebibytes MiB, gibibytes GiB; as opposed to KB, MB, GB.
    – user16898
    Apr 27, 2019 at 21:53
  • @Aza It's not as general as a rule as you'd like to think. If it were, there wouldn't be such confusion over it. Look at the file sizes on a Microsoft system, for example, or the actual number of bytes of RAM in your 1GB DDR memory module. Computers are inherently base-2 devices in most cases, so the binary representation actually makes more sense. Programmers tend to be more base-2 oriented, engineers more base-10 oriented. One can't assume MB is decimal or binary without context, even 20+ years after the standardization.
    – sfdcfox
    May 2, 2019 at 11:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .