Skip to content

websocat

Command-line client and server for WebSockets, for developers who use netcat, curl or

Permissive (OSI) · MIT
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

63

Health

Active

Overview

Stars

8,759

Last commit

10 days ago

Nov 2026

Repository age

10 years

since Nov 2016

Latest version

v1.14.2

Nov 2026

Contributors

–

3 active in 90 days

Releases

2

last 12 months

Language

Rust

Websocat is a command-line tool written in Rust that connects to WebSocket servers, runs its own WebSocket server, and pipes data between WebSockets and other things. Think of it as netcat, curl and socat for the WebSocket protocol.

You can send lines from stdin as messages, run an external program and wire its stdin and stdout to a socket, or proxy TCP connections to WebSocket connections and back. It supports text and binary modes, inetd mode, UNIX sockets (including abstract ones on Linux), auto-reconnect, connection reuse, and unauthenticated SOCKS5 servers. It can sit behind Nginx over TCP or UNIX sockets. A JSON-RPC option helps when you talk to services such as Chromium's remote debugging port.

Pre-built binaries exist for Linux, Windows, macOS and Android. You can also install it through Homebrew, MacPorts or FreeBSD pkg, run the Docker image, or build it with cargo. It is MIT licensed. It is a developer utility, so it does not replace a specific commercial product, but it covers testing and debugging work that otherwise needs custom scripts or browser tools.

Who it's for

Backend developers debugging WebSocket APIs

You can connect to an endpoint from a terminal and type or pipe messages without writing a client.

Skip if: You prefer a graphical client with saved requests and message history.

Sysadmins bridging TCP services over WebSockets

It can proxy TCP, such as SSH, through a WebSocket link and back again.

Skip if: You need a full VPN or tunnel product with authentication and access control.

Shell scripters automating realtime tests

It works with stdin and stdout, so it fits into pipes and scripts.

Skip if: Your tests already run in a language with a mature WebSocket library.

The problem it solves

Plain netcat and curl do not speak the WebSocket protocol well, so testing or scripting against a WebSocket service usually means writing a throwaway client. Websocat gives you a terminal tool that handles the protocol and connects it to pipes, sockets and programs.

Strengths

  • Acts as both WebSocket client and server from one binary
  • Bridges WebSockets with TCP, UNIX sockets, stdin/stdout and external programs
  • Pre-built binaries for Linux, Windows, macOS and Android
  • Auto-reconnect and connection-reuse modes
  • MIT license with an official Docker image

Trade-offs

  • Command-line only; no graphical interface
  • Long option syntax takes time to learn
  • Version 1 depends on older libraries and may not build on very new Rust
  • Not officially packaged for Debian or Ubuntu

Frequently asked questions

Is websocat free?

Yes. It is released under the MIT license.

Which platforms does it run on?

Linux, Windows, macOS and Android have pre-built binaries. It is also available through FreeBSD pkg, Homebrew and MacPorts.

Can I run it in Docker?

Yes. An image is published at ghcr.io/vi/websocat, and you can pass a ws or wss URL to it.

Can I use it as a server?

Yes. Running it with the -s option and a port starts a WebSocket server.

Similar tools in Network tools

dnscrypt-proxy

Network tools

Local DNS proxy that encrypts your queries with DoH, DNSCrypt and ODoH

14k 1.1k yesterday Thriving ISC

cloudflare-ddns

Network tools

Dynamic DNS updater in Docker that keeps Cloudflare records on your current IP

3k 121 4 days ago Active Apache-2.0

Upsnap

Network tools

Wake-on-LAN web dashboard for homelabs, with scheduling and device scanning

6.5k 256 17 days ago Thriving MIT

AdGuard Home

Network tools

Network-wide DNS server that blocks ads and trackers for every device on your network

39k 2.6k today Thriving GPL-3.0

networking-toolbox

Network tools

Self-hosted collection of IP, subnetting and network tools for sysadmins, usable offline

2.7k 237 2 months ago Slowing MIT

poweradmin

Network tools

Web UI and REST API for managing PowerDNS zones, records and DNSSEC

934 298 today Active GPL-3.0