npm Package Size Analyzer

Check the TRUE size of any npm package before installing. See what you're really downloading.

Try These Popular Packages

Why Check npm Package Sizes?

Before running npm install, you should know what you're actually downloading. Many packages seem small but include massive dependency trees that bloat your node_modules and bundle size.

Our npm package size analyzer shows you the TRUE cost of each package - including all transitive dependencies. Make informed decisions and keep your bundles lean.

How It Works

  1. Enter any npm package name (e.g., "lodash", "moment", "react")
  2. We fetch package metadata from the npm registry API
  3. Calculate the package size and analyze its dependencies
  4. Show you the total download size including all dependencies
  5. Estimate download times on different connection speeds

Privacy-first: All API calls happen directly from your browser to npm's public registry. We don't track what packages you check or store any data.

Common Bundle Size Surprises

  • moment.js: Seems small, but the full package is ~290KB (71KB gzipped)
  • lodash: Full library is ~70KB, but you can import individual functions
  • axios: Small and efficient at ~13KB gzipped
  • date-fns: Smaller alternative to moment at ~2KB per function

Tips to Reduce Bundle Size

  • Import selectively: Use import { function } from 'package' instead of importing everything
  • Use lighter alternatives: Replace moment with date-fns, lodash with native methods
  • Enable tree-shaking: Use ES modules and tools like Webpack or Rollup
  • Code splitting: Load large packages only when needed
  • Check before installing: Always analyze package size first

Why Bundle Size Matters

Every kilobyte you add to your JavaScript bundle:

  • Increases download time for users (especially on mobile/slow connections)
  • Increases parse and compile time in the browser
  • Hurts SEO and Core Web Vitals scores
  • Costs users money on metered connections
  • Reduces conversion rates (users bounce on slow sites)

A 1-second delay in load time can reduce conversions by 7%. Keep your bundles small!