# sindresorhus/is-online

Check if the internet connection is up

Repository: https://github.com/sindresorhus/is-online
Canonical: https://ross.abutalabs.com/products/is-online
Language: JavaScript
License: MIT
License Family: permissive
Topics: internet, internet-connection, nodejs, javascript, browser, connectivity, detect, network, online, ping, reachability
Last push: 2025-11-15T09:12:15+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 52, release rhythm 45, longevity 100
- inputs: {"age_days": 4366, "days_push": 291, "days_rel": 291, "gap_med": 32.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1357, forks 88 (observed 2026-08-28T04:04:29.499380+00:00)

## What it is
A JavaScript library that checks whether the internet connection is actually up, unlike navigator.onLine which only reports local network status. It runs parallel connectivity checks (HTTPS endpoints, DNS queries, captive portal test) in Node.js and the browser and resolves to a boolean.

## Use cases
- check if the internet connection is up
- detect real internet connectivity in nodejs
- verify online status before making api calls
- check ipv6 connectivity
- detect captive portal internet access
- show online/offline indicator in a web app
- wait for network reconnection after going offline

## When to choose
- you need to know if the internet is truly reachable, not just the local network
- you want a maintained, promise-based connectivity check with timeout and abort support
- you need the same check to work in both Node.js and bundled browser code
- you need to assert IPv4 or IPv6 connectivity specifically

## When to avoid
- you only need local network interface status (navigator.onLine suffices)
- you need continuous connection monitoring rather than on-demand checks
- you cannot tolerate outbound requests to third-party endpoints
- you need low-level socket or ping-based diagnostics

## Facets
- artifact type: library
- maturity: active
- function: http-client, networking, developer-tools
- domain: networking, web-development, developer-tools
- platform: browser, cross-platform
- tags: connectivity-check, internet-detection, online-status, ping-alternative, captive-portal, nodejs

## Member repositories
- sindresorhus/is-online (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:29.499380+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:41:52.172362+00:00, confidence not recorded.
  - readme: https://github.com/sindresorhus/is-online (fetched 2026-08-28T04:04:29.499380+00:00, sha feb93dd72254)
  - registry_npm: https://registry.npmjs.org/is-online (fetched 2026-08-29T12:00:23.772081+00:00, sha a43a322e5097)
- Data as of 2026-08-30T08:39:29.467469+00:00.
