Skip to main content

Comparison guide

Axios vs Swr

Compare exact npm versions, dated downloads and versioned bundle measurements, with sources and retrieval times. Missing evidence stays unavailable. These facts do not establish interchangeability, compatibility, code quality or security. Check each project’s documentation and test the behavior your task requires.

Scroll the table horizontally to compare packages. Each fact includes its source and limits.

Package evidence
Factaxiosswr
Analyzed version1.21.12.5.1
npm downloads
148,586,362

2026-11-18 through 2026-11-24 (inclusive)

Source

Retrieved: 2026-11-26T06:01:59.701Z

All versions; includes CI and repeat downloads, not unique users.

27,906,055

2026-11-18 through 2026-11-24 (inclusive)

Source

Retrieved: 2026-11-26T06:01:59.925Z

All versions; includes CI and repeat downloads, not unique users.

Browser bundle
21.0 KB gzip

56.8 KB minified

Bundlephobia minified + gzip

Version 1.21.1

Source

Retrieved: 2026-11-26T06:01:59.702Z

Synthetic default-entry browser bundle; imports, plugins, runtime and bundler settings change app output.

5.6 KB gzip

12.6 KB minified

Bundlephobia minified + gzip

Version 2.5.1

Source

Retrieved: 2026-11-26T06:01:59.759Z

Synthetic default-entry browser bundle; imports, plugins, runtime and bundler settings change app output.

Version released
2026-11-09T16:17:55.565Z

Version 1.21.1

Source

Retrieved: 2026-11-26T06:01:59.547Z

Publisher-declared metadata; not an independent code audit.

2026-08-12T13:53:07.470Z

Version 2.5.1

Source

Retrieved: 2026-11-26T06:01:59.646Z

Publisher-declared metadata; not an independent code audit.

Registry modified
2026-11-09T16:17:55.824Z

Version 1.21.1

Source

Retrieved: 2026-11-26T06:01:59.547Z

Registry document modification, not necessarily a code release.

2026-09-22T11:55:23.064Z

Version 2.5.1

Source

Retrieved: 2026-11-26T06:01:59.646Z

Registry document modification, not necessarily a code release.

Declared license
MIT

Version 1.21.1

Source

Retrieved: 2026-11-26T06:01:59.547Z

Publisher-declared metadata; not an independent code audit.

MIT

Version 2.5.1

Source

Retrieved: 2026-11-26T06:01:59.646Z

Publisher-declared metadata; not an independent code audit.

Registry-declared types
index.d.ts./index.d.ts./index.d.cts

Version 1.21.1

Source

Retrieved: 2026-11-26T06:01:59.547Z

Registry-declared paths only; files, correctness and runtime compatibility have not been verified. Missing paths mean unknown.

./dist/index/index.d.ts./dist/index/index.d.mts./dist/index/react-server.d.mts./dist/infinite/index.d.mts./dist/infinite/index.d.ts./dist/mutation/index.d.mts./dist/mutation/index.d.ts./dist/_internal/index.d.mts./dist/_internal/index.d.ts./dist/immutable/index.d.mts./dist/immutable/index.d.ts./dist/subscription/index.d.mts./dist/subscription/index.d.ts

Version 2.5.1

Source

Retrieved: 2026-11-26T06:01:59.646Z

Registry-declared paths only; files, correctness and runtime compatibility have not been verified. Missing paths mean unknown.

npm unpacked size
2.1 MB

Version 1.21.1

Source

Retrieved: 2026-11-26T06:01:59.547Z

npm unpacked archive size; not a browser bundle measurement.

312.8 KB

Version 2.5.1

Source

Retrieved: 2026-11-26T06:01:59.646Z

npm unpacked archive size; not a browser bundle measurement.

Security advisories
Not checked

Retrieved: Unavailable

No advisory service is queried. Not checked does not mean safe.

Not checked

Retrieved: Unavailable

No advisory service is queried. Not checked does not mean safe.

Analyzed versions follow the latest npm dist-tag at acquisition. Compatibility has not been verified.

  • axios: Promise based HTTP client for the browser and node.js
  • swr: React Hooks library for remote data fetching

Comparable observations

axios has the highest recorded download count for this period. Downloads do not measure suitability.

swr has the smallest measured gzip size. Package roles and app output may differ.

Compare axios, swr using the recorded facts above. These npm names may represent different tools, runtimes or libraries. Check each project's documentation and test the required behavior before treating packages as substitutes.

Download observations

axios has the highest recorded download count for this period. Downloads do not measure suitability.

Bundle measurement

swr has the smallest measured gzip size. Package roles and app output may differ.

Release and declaration limits

A version release date records publication. Registry modification can reflect metadata changes. Declared type paths and licenses come from publisher metadata; neither establishes code quality, runtime support or compatibility.

How to decide

There is no overall winner from these metrics. Match the package’s documented purpose, supported environment and APIs to your task, then test the imports and behavior your application needs. Security advisories are not checked here.

Frequently Asked Questions

Do download counts identify the best package?
No. Counts cover the displayed period and all versions, including repeat and automated downloads. They do not measure unique developers, code quality or fitness for your task.
Can these bundle sizes predict my application size?
Bundlephobia measures a synthetic default-entry browser bundle for the displayed version. Imports, plugins, runtime and bundler settings change app output. Unavailable measurements are not zero bytes.
Does Not checked mean there are no vulnerabilities?
No. PkgPulse does not query an advisory service. Not checked is distinct from a verified source reporting zero advisories, and neither guarantees safety.

Related Comparisons

The 2026 JavaScript Stack Cheatsheet

One PDF: the best package for every category (ORMs, bundlers, auth, testing, state management). Used by 500+ devs. Free, updated monthly.