libwebsockets
libwebsockets: A self-hosted C library for WebSockets, HTTP, WebTransport, MQTT and more. Ranked #24 of 55 in WebSocket Tools by our editors (6.3/10); pricing: Open source; best for C developers needing broad transport support.
At a glance
- Editor score6.3 / 10
- PricingOpen source
- Best forC developers needing broad transport support
- Paid fromNone
- Deployment modelLibrary
- Founded2010
- Facts checked28 Sep 2026
Where it wins
- Supports HTTP/1.x, HTTP/2, HTTP/3, WebSockets, WebTransport and MQTT.
- Offers optional TLS and integration with several event-loop libraries.
- Runs on Windows, macOS and Linux, with CMake configuration and cross-building.
Where it doesn't
- It is source code to integrate into an application, not a hosted service.
- The client SDK is C, which narrows its fit for teams using other languages.
- Support channels are community and documentation.
Our verdict on libwebsockets
libwebsockets is a free, MIT-licensed C library for implementing network clients and servers. It is aimed at developers building applications that need WebSockets alongside other transports, especially C developers who want to host and integrate the networking layer themselves. The project supports Windows, macOS and Linux, and its description also identifies Unix-like systems, embedded platforms and FreeRTOS. It is distributed as source code rather than as a managed real-time messaging service, so it suits teams that want a library to incorporate into an application, not buyers looking for a hosted endpoint or service plan.
Transport breadth is the main reason to consider it. The library supports WebSocket client and server roles, HTTP/1.x, HTTP/2 and HTTP/3 client and server support, WebTransport, WebSocket over HTTP/2 or HTTP/3, an MQTT client role, and raw TCP, UDP and file roles. Optional TLS is available across supported roles. Its nonblocking event loop supports single- or multi-threaded service threads, and integrations include poll, libuv, libevent, libev, glib, sdevent and uloop. That range makes it relevant when one C library needs to cover multiple protocol roles or fit an existing event-loop choice; teams seeking only a narrow WebSocket client may not need this scope.
The project is configured with CMake and supports cross-building, but the source-code distribution means application integration is part of adopting it. It is self-hosted and open source, with no hosted service plans described; the published licensing and pricing model is free and MIT-licensed. Support channels are community and documentation, rather than a stated managed-service support arrangement. Choose libwebsockets when control over deployment and a broad set of transports matter and the team can work in C. Consider a managed real-time service instead if you want the provider to operate the messaging infrastructure, or a library for another language if C is not a fit.
libwebsockets pricing
libwebsockets fact sheet
| Free plan | Not verified |
|---|---|
| Paid from | None |
| Deployment model | Library |
| Free concurrent connections | Not verified |
| Pub/sub messaging | Yes |
| Self-hosting available | Yes |
| Client SDKs | C |
| Protocol support | HTTP/1.x, HTTP/2, HTTP/3, WebSockets, ws-over-h2, ws-over-h3, WebTransport, MQTT, raw TCP, UDP, file |
| Deployment | Self-hosted |
| Platforms | Windows, macOS, Linux |
| Support | Community, Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Integrations | 6 integrations: libuv, libevent, libev, glib, sdevent, uloop |
| Pricing | Open source |
| Website | libwebsockets.org |
| Facts checked | 28 Sep 2026 |
libwebsockets integrations
libwebsockets lists 6 integrations on its own site.
- libuv
- libevent
- libev
- glib
- sdevent
- uloop
Alternatives to libwebsockets
- Socket.IOAn open-source library for real-time apps, with transport fallback and reconnection built in.9.3
- Ably Pub/SubFeature-rich managed pub/sub, with a free tier and paid plans from $29/month.8.8
- Azure Web PubSubA managed Azure service for real-time apps that need WebSockets, pub-sub, and scale.8.7
See all libwebsockets alternatives →
Used libwebsockets? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used libwebsockets for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
libwebsockets is listed in our WebSocket Tools directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/libwebsockets/"><img src="https://www.itechguides.com/best/badge/libwebsockets.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Guides on WebSocket tools
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. How we rank.
Last updated · How we research and update