# socket.io-client

> Realtime application framework client

Latest version **4.8.3** (published 2025-12-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install socket.io-client
pnpm add socket.io-client
yarn add socket.io-client
bun add socket.io-client
```

## Health

**Score 80/100 (A)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score; popular repo; extremely popular.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.8.3 |
| Published | 2025-12-23 |
| First published | 2011-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 4 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 63203 |
| Maintainers | rauchg, darrachequesne |
| Keywords | realtime, framework, websocket, tcp, events, client |

## Links

- npm: https://www.npmjs.com/package/socket.io-client
- Repository: https://github.com/socketio/socket.io
- Homepage: https://github.com/socketio/socket.io/tree/main/packages/socket.io-client#readme
- Issues: https://github.com/socketio/socket.io/issues
- npm.io page: https://npm.io/package/socket.io-client

## Dependencies (4)

- [debug](https://npm.io/package/debug.md) ~4.4.1
- [engine.io-client](https://npm.io/package/engine.io-client.md) ~6.6.1
- [socket.io-parser](https://npm.io/package/socket.io-parser.md) ~4.2.4
- [@socket.io/component-emitter](https://npm.io/package/@socket.io/component-emitter.md) ~3.1.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 4.8.3 (latest) — 2025-12-23
- 4.6.0-alpha2 (alpha) — 2023-02-04
- 2.5.0 (v2-latest) — 2022-06-26
- 3.1.3 (v3-latest) — 2021-03-12
- 3.0.0-rc4 (beta) — 2020-10-30
- 4.8.2 — 2025-12-22
- 4.8.1 — 2024-10-25
- 4.8.0 — 2024-09-21
- 4.7.5 — 2024-03-14
- 4.7.4 — 2024-01-12
- 4.7.3 — 2024-01-03
- 4.7.2 — 2023-08-02
- 4.7.1 — 2023-06-28
- 4.7.0 — 2023-06-22
- 4.6.2 — 2023-05-31
- … 116 more at https://npm.io/package/socket.io-client/versions

## README

# socket.io-client

[![Build Status](https://github.com/socketio/socket.io-client/workflows/CI/badge.svg?branch=main)](https://github.com/socketio/socket.io-client/actions)
[![NPM version](https://badge.fury.io/js/socket.io-client.svg)](https://www.npmjs.com/package/socket.io-client)
![Downloads](http://img.shields.io/npm/dm/socket.io-client.svg?style=flat)
[![](http://slack.socket.io/badge.svg?)](http://slack.socket.io)

[![Sauce Test Status](https://saucelabs.com/browser-matrix/socket.svg)](https://saucelabs.com/u/socket)

## Documentation

Please see the documentation [here](https://socket.io/docs/v4/client-initialization/).

The source code of the website can be found [here](https://github.com/socketio/socket.io-website). Contributions are welcome!

## Debug / logging

In order to see all the client debug output, run the following command on the browser console – including the desired scope – and reload your app page:

```
localStorage.debug = '*';
```

And then, filter by the scopes you're interested in. See also: https://socket.io/docs/v4/logging-and-debugging/

## License

[MIT](/LICENSE)

---
_Source: https://npm.io/package/socket.io-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
