Check the bytes before compressing the file
An upload form says 25 MB, but your file manager shows 24.8. Before repeatedly exporting at lower quality, check what each program means by MB. A decimal megabyte contains 1,000,000 bytes; a mebibyte contains 1,048,576. The same label is sometimes used loosely, so the exact byte count is the useful starting point.
This converter keeps the two systems separate. It does not resize a photo or rewrite a document. Selecting files simply adds the sizes supplied by your browser; the calculation does not need their contents. For a folder of attachments, select the files together and compare their combined size with a total cap. For a per-file cap, switch Apply limit to Each selected file. The list shows which files pass; a combined total can exceed the cap while every individual file still meets it.
If the total is too large, choose the next step based on the content. Image resizing can reduce unnecessary pixels. PDF compression may shrink scanned pages, while an already optimized file may barely change. Keep the original and inspect the result before submitting it. Renaming an extension does not reduce the underlying data.
A size check cannot promise acceptance. A service can count encoded attachments or request overhead, enforce a strictly-less-than limit, or reject a format independently of its size. Use the destination’s current instructions and leave some headroom when the boundary is unclear.
Formula and worked example
Output size = input size × bytes per input unit ÷ bytes per output unit.
A 24 MiB file contains 25,165,824 bytes, or 25.165824 MB. Against an inclusive 25 MB cap, it is 165,824 bytes too large. Changing the displayed unit does not change the file.
Unit definitions: NIST: binary prefixes and SI comparisons. Calculations use JavaScript numbers; displayed conversions are rounded to six decimal places, with scientific notation for very small values. Inputs above the safe byte-count range are rejected.