Built something? We create video reels & spotlights for GitHub projects.Promote your project →
sindresorhus
Home / JavaScript / pretty-bytes

sindresorhus/pretty-bytes

Convert bytes to a human readable string: 1337 → 1.34 kB

JavaScript ◇ developer-tools MIT
★1.3KSTARS
⑂94FORKS
!0ISSUES
🏆#2,325GLOBAL RANK
🔥3DAYS TRENDING
🚀
Maintainer Growth Kit for pretty-bytes

Claim this project, add your verified backlink badge to your README, and download milestone cards.

Claim Repo

Star History

Continuous Observations
Interactive star growth chart for sindresorhus/pretty-bytes
CSV

Momentum

+33

STARS · LAST 30 DAYS

1

PER DAY

#151

MOST-STARRED JavaScript

Window7 days30 days90 days
Stars gained+7+33+90
Per day111
Forks gained+1+3+10

pretty-bytes gained 33 stars in the last 30 days, about 1 a day, and now has 1.3K. It is about 13 years old and has averaged roughly 101 stars a year. It ranks #151 among JavaScript repositories and #2,325 across all languages on GitHubRepo.

Trending Record

pretty-bytes has maintained a continuous presence across global trending indexes, peaking at #1955. Below is the 30-day activity profile:

💡 Overview

pretty-bytes is an open-source project written in JavaScript: Convert bytes to a human readable string: 1337 → 1.34 kB.

Engineered for speed, consistency, and developer ease, it solves common hurdles in JavaScript. It provides clear interfaces, comprehensive configuration options, and seamless integration with existing tools across the modern development stack.

⚡ Key Features

1

Optimized execution pipeline written in JavaScript for predictable speed.

2

Zero-friction configuration with comprehensive sensible defaults out of the box.

3

Cross-platform runtime support across Linux, macOS, and Windows environments.

4

Strong typing and modular architecture designed for easy extension and maintainability.

5

Standardized CLI and API interfaces for smooth integration into CI/CD workflows.

6

Active community maintenance with regular dependency updates and security patches.

📥 Installation

terminal
$ npm install pretty-bytes

⚙ System Requirements

Platforms

  • • macOS
  • • Linux
  • • Windows

Runtime & Dependencies

Node.js >= 18 or modern Evergreen browser

Architecture

x86_64, ARM64 (Apple Silicon & Graviton)

🧠 How It Works

pretty-bytes coordinates its core functionality through a modular JavaScript pipeline. It parses configuration parameters, validates inputs, and resolves dependencies asynchronously. By minimizing runtime overhead and keeping allocations localized, it delivers predictable performance in both local development environments and automated production workloads.

🎯 Production Use Cases

Production System Integration

Embed pretty-bytes into JavaScript backend services to handle core application logic.

CI/CD Automated Pipelines

Run automated validation, builds, and integration suites during deployments.

Developer Tooling & Workflows

Accelerate developer onboarding with pre-configured project utilities.

Open Source Extension

Fork and customize internal modules under the repository's open MIT license.

🚀 Getting Started

1

Install pretty-bytes using your package manager: `npm install pretty-bytes`

2

Initialize your project workspace or configuration file for pretty-bytes.

3

Import pretty-bytes into your codebase or invoke it directly from your terminal.

4

Execute your test suite or run `pretty-bytes --help` to verify successful setup.

👍 Strengths

Active community backing with 1,311 GitHub stars and verified adoption.
Permissive open-source distribution under the MIT license.
Built in JavaScript for high execution speed and developer familiarity.
Cross-platform compatibility across modern Linux, macOS, and Windows environments.
Clean modular design allowing flexible configuration and pipeline integration.

⚠️ Considerations

Requires familiarity with JavaScript and modern CLI workflows.
Ecosystem extensions may require manual configuration depending on environment constraints.
Active development roadmap means breaking API changes may occur across major versions.

⇄ Alternatives & Direct Competitors

E
affaan-m/ECC ★ 268.3K JavaScript

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Compare ↗
R
react/react ★ 250.8K JavaScript

The library for web and native user interfaces.

Compare ↗
J
trekhleb/javascript-algorithms ★ 196.8K JavaScript

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings

Compare ↗
P
DietrichGebert/ponytail ★ 146.9K JavaScript

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

Compare ↗

👥 Who Should Use This

Developers and engineering teams building with JavaScript, seeking reliable, tested, and actively maintained tooling for production workloads.

🏆 Nearby in the Rankings

sindresorhus/pretty-bytes is currently ranked #2,325 by stars across every repository tracked on GitHubRepo. These are adjacent projects:

RankRepositoryLanguageStarsAction
#2,319 eliaskosunen/scnlib C++ ★ 1.3K Compare ↗
#2,321 erlyaws/yaws Erlang ★ 1.3K Compare ↗
#2,321 google/crosvm Rust ★ 1.3K Compare ↗
#2,323 vyos/vyos-build Python ★ 1.3K Compare ↗
#2,324 apple/python-apple-fm-sdk Python ★ 1.3K Compare ↗
#2,325 sindresorhus/pretty-bytes This Project JavaScript ★ 1.3K
#2,325 Shopify/maintenance_tasks Ruby ★ 1.3K Compare ↗
#2,327 ZachSaucier/Just-Read JavaScript ★ 1.3K Compare ↗
#2,327 spring-cloud/spring-cloud-openfeign Java ★ 1.3K Compare ↗
#2,327 Jman-Github/Universal-ReVanced-Manager Kotlin ★ 1.3K Compare ↗
#2,330 AvdLee/Diagnostics Swift ★ 1.3K Compare ↗

Frequently Asked Questions

What does pretty-bytes do? +

Convert bytes to a human readable string: 1337 → 1.34 kB

What language is pretty-bytes written in? +

The primary language is JavaScript. Topics include: software.

Is pretty-bytes actively maintained? +

Yes, the last recorded push was on Sep 26, 2026 with 0 open issues being tracked.

How many stars does pretty-bytes have? +

pretty-bytes has 1,311 stars and 94 forks on GitHub.

How does pretty-bytes rank among GitHub repositories? +

With 1,311 stars, sindresorhus/pretty-bytes is ranked #2,325 globally across all repositories tracked on GitHubRepo and #151 among JavaScript projects.

What license is pretty-bytes distributed under? +

The repository reports a MIT license. Always verify the repository LICENSE file for legal terms.

From our network
FOR MAINTAINERS

Built something? Put it in front of millions of developers.

We make a short reel about your project and post it across YouTube, Instagram, Threads, and X. Send a link, we do the rest.