zenstruck/bytes
Small PHP bytes utility for working with file sizes: parse human-readable strings (e.g. "10 MB"), format byte counts, compare values, and convert between units. Handy for Laravel/PHP apps needing consistent size handling and validation.
For Executives: "This package lets us standardize how we display and process file sizes across the product—reducing dev time and improving user clarity. For example, instead of users seeing raw numbers like '1,234,567 bytes' in storage alerts, they’ll see '1.2 MB,' which drives better engagement and reduces support questions. It’s a lightweight, MIT-licensed tool that cuts custom coding for a common but tedious task, freeing the team to focus on higher-value features."
For Engineering: *"Zenstruck/Bytes is a battle-tested, minimal library for parsing, formatting, and manipulating bytes. It handles edge cases (like large numbers) and supports humanization (e.g., '1.2 GB'). Perfect for:
How can I help you explore Laravel packages today?