# ws: 7.8 out of 10

A strong pick. 4th of 10 in [Realtime and collaboration](https://elestia.ai/opensource/realtime/index.md).

ws is the standard low-level WebSocket client and server for Node.js. It is fast, has no dependencies and is carefully maintained. It is a strong pick when you want raw WebSockets. It gives you only the transport, so rooms, reconnection and shared editing are left to you or to tools such as Socket.IO, Yjs or Hocuspocus.

**Best for:** Node.js developers who want a lean, standards-compliant WebSocket server or client and will build their own messaging layer on top.

## Scores

- **Overall: 7.8** (likely 6.7 to 8.7)
  - Claude Opus 5.5 (7.5): ws is the best choice when you need a plain WebSocket server or client in Node.js. It is mature, actively maintained and recommended by Node.js itself. It is not the default for the category's broader job: Socket.IO gives you rooms and reconnection, and Yjs or Hocuspocus handle collaborative editing. Those tools often use ws underneath.
  - GPT-6.2 Sol (8.0): ws is a strong choice for a new Node.js service that needs standard WebSockets, with a documented API, competitive performance, and a record of shipping security fixes. Socket.IO is a better starting point for apps that need built-in reconnects and rooms, and Yjs is a better starting point for concurrent editing. The fit depends on how much connection and application state the team wants to own, and publishing still rests with one maintainer.
- **Needed by many: 5.4** (likely 4.3 to 6.5)
  - Claude Opus 5.5 (6.0): Many Node.js web apps need a WebSocket server, and ws is the usual base for one. It covers only the transport part of the category, not collaborative editing. It runs on Node.js only and does not work in the browser.
  - GPT-6.2 Sol (4.7): Chat, games, and live dashboards can use its two-way transport, and it works across Node.js frameworks. Its audience narrows to teams that need a WebSocket server or more control than Node.js's built-in client provides. The developer survey measures Node.js use, so demand for that narrower job remains an estimate.
- **Helps a lot: 7.9** (likely 6.9 to 8.9)
  - Claude Opus 5.5 (7.5): As a raw WebSocket implementation it is about as good as it gets in Node.js. It is correct, thoroughly tested, fast and well documented, and AI agents write code for it reliably. For the category's job it is a building block only: rooms, reconnection, auth helpers and sync have to be built on top. uWebSockets.js uses less memory at very high connection counts.
  - GPT-6.2 Sol (8.2): Version 8.23.0 has a small API, client and server conformance tests, and named errors that help developers and coding agents diagnose failures. The separate TypeScript declarations can lag runtime options, and teams own the behavior around dropped connections. An independent benchmark put ws 8.22.0 close to uWebSockets.js in throughput on Node.js, though it measured a simple two-client relay.
- **Holds up over time: 7.9** (likely 6.5 to 8.8)
  - Claude Opus 5.5 (8.0): The project is active, with 23 releases and 60 commits in the last year, only 6 open issues, and careful backports to old major lines. The 8.x API has been stable for years. Node.js has no built-in server, so ws remains the base layer. The main risk is that most releases are published by one maintainer.
  - GPT-6.2 Sol (7.7): Sixty commits and 23 releases over the past year show active maintenance, with security fixes reaching older versions. A user reported that a tighter fragment limit disrupted legitimate traffic, and the maintainer answered the same day with a configuration option. Recent releases came from one npm maintainer, and public sponsorship leaves long-term staffing uncertain.
- **Used widely: 8.4** (likely 7.3 to 9.2)
  - Claude Opus 5.5 (9.0): About 900,000 dependent repos and 19,000 dependent packages make it the most used package in the category, even though most downloads are transitive. Downloads grew 3.3x in a year, which is below the 4.1x median, so its share is slipping slightly. Direct choice is still very large.
  - GPT-6.2 Sol (7.8): The collector found about 900,000 dependent repositories, behind Socket.IO's 1.35 million and well ahead of the other measured peers. Socket.IO itself pulls in ws through Engine.IO, and repeated automated installs further inflate the 1.61 billion downloads. Downloads grew 3.32 times year over year, below the 4.1 times catalog median, so its relative share slipped by that measure. The count of projects actively choosing ws today remains uncertain.
- **Vouched for: 8.2** (likely 7.1 to 9.1)
  - Claude Opus 5.5 (8.0): The official Node.js docs recommend it. It is part of Node's CITGM ecosystem testing. Major tools depend on it, including Next.js, VS Code and Puppeteer. Independent guides call it the standard Node.js WebSocket implementation. There is little survey data specific to ws.
  - GPT-6.2 Sol (8.3): Socket.IO's Engine.IO transport and Fastify's WebSocket plugin depend on ws, and NestJS ships a dedicated adapter. Those integrations and a recent independent benchmark support its quality as a transport. The evidence is strongest for framework use and simple message exchange, with less visibility into application-level satisfaction and production workloads.
- **Safe: 7.1** (likely 6.0 to 8.1)
  - Claude Opus 5.5 (7.0): It has zero dependencies and an MIT licence, and advisories are fixed quickly with backports. However, 2026 brought several remote memory-exhaustion DoS issues (CVE-2026-48779, a follow-up CVE-2026-62389, and the Pong flood fixed in 8.23.0) plus a memory disclosure. The Scorecard is 5.9, with no branch protection, fuzzing or SAST, and a single main publisher.
  - GPT-6.2 Sol (7.2): The MIT license and zero required runtime dependencies limit supply-chain exposure. Version 8.23.0 fixes the known 2026 memory issues, including a high-severity November denial-of-service advisory missing from the bundle that received a fix and three backports on disclosure day. The 5.9 OpenSSF Scorecard flags weak review, branch protection, pinning, and fuzzing, and leaves packaging and release signing unscored. A single listed npm maintainer concentrates publishing access.

## Good

- It has zero runtime dependencies and a small, stable API that has not had a major breaking release since 8.0.
- The Node.js docs recommend it for WebSocket servers, and many tools build on it, including Next.js, VS Code, Puppeteer and Socket.IO's engine.
- Security fixes ship fast and are backported to the 5.x, 6.x and 7.x lines.
- It runs fast with modest memory use and supports permessage-deflate, binary frames and backpressure.

## Bad

- It has no rooms, named events, automatic reconnection, fallbacks or scaling across servers. You have to build these yourself.
- Types come from the separate @types/ws package, not from ws itself.
- Releases depend mostly on one maintainer, and the OpenSSF Scorecard shows weak code review and branch protection.
- Several memory-exhaustion DoS advisories appeared in 2026, so servers need prompt upgrades.

## The numbers

- Downloads, 4 weeks: 1.6B
- In a year: ×3.3
- GitHub stars: 23k
- Commits, 12 months: 60
- Last npm release: Nov 2026
- Advisories, 24 months: 2
- Licence: MIT
- GitHub: https://github.com/websockets/ws
- npm: https://www.npmjs.com/package/ws

Many packages install it, so most downloads are not a direct choice.

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
