prettysize

JSON →
library 2.0.0 ·javascript
verified May 27, 2026

A lightweight utility to convert byte counts into human-readable strings (e.g., 1024 → "1 kB") for logging and CLI output. Version 2.0.0 supports sizes from bytes up to exabytes, with options to remove spaces, use single-character suffixes, control decimal places, or return only the numeric value. Minimal dependencies, pure JavaScript, works in Node.js and browsers. Alternatives like filesize.js offer more formatting features, but prettysize focuses on simplicity and small footprint.

total hits 34
actors 9 distinct systems
last hit 1d ago AhrefsBot
ByteDance
6
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
7

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇦🇺 Australia · VN