Quick Start
speedtest-go measures your internet connection against speedtest.net servers. It comes as a command-line tool and as a Go library.
It measures:
- Latency and jitter, over HTTP, TCP, or ICMP
- Download and upload rates, over HTTP or TCP
- Packet loss
It is a fork of showwin/speedtest-go, updated to the latest Go version and dependencies, with a redesigned v2 library API.
Install
On Linux and macOS, the install script downloads the latest release, verifies its checksum, and installs it:
tmp=$(mktemp)
curl -sSfL https://raw.githubusercontent.com/nicholas-fedor/speedtest-go/master/scripts/install.sh -o "$tmp" && sh "$tmp"Installation covers the script’s options, updating, and uninstalling, and the other methods: binaries for Linux, macOS, and Windows, Go, Docker, and Kubernetes.
Run a test
speedtest-gospeedtest-go tests the server near you with the lowest latency. How a Test Works explains each step.
Choose the output
| Output | Flag | Use it for |
|---|---|---|
| Live progress | none | Watching a test in a terminal |
| Plain lines | --unix | Logs, and terminals that cannot redraw |
| One JSON document | --json | Scripts that read the whole result |
| One JSON line per server | --jsonl | Scripts that process servers one at a time |
speedtest-go --json > result.jsonReading the Results explains each output.
Choose the servers
list shows the servers near you, with their IDs, distances, and latencies:
speedtest-go listPass one or more IDs to test them:
speedtest-go --server 6691 --server 6087Choosing servers covers testing near another location, filtering by country, and spreading a test across several servers.
Next steps
| To | See |
|---|---|
Set defaults, so a plain speedtest-go runs the way you want | Configuration |
| Look up every flag | CLI Reference |
| Understand an error or an exit code | Troubleshooting |