Skip to content
I

Is Online

Check if the internet connection is up

by sindresorhusFree

#411in Social
0In stores

Description

is-online checks whether the internet connection is up. It works in Node.js and, when bundled, in modern browsers. The browser's own navigat…

Highlights

  • Resolves to true or false for internet access
  • Parallel checks in Node.js and in browsers
  • Timeout, AbortSignal and IPv4 or IPv6 options
  • Custom fallback URLs
  • Requires Node.js 20 or newer

Ratings & Reviews

No ratings yet

Be the first to rate Is Online.

People also visit

I

Is Reachable

Check if servers are reachable

Social
Launch
D

Dstp

Run common networking tests against any site

Developer Tools
Launch
W

WiFiman Desktop

Network monitoring and troubleshooting tool

Developer Tools
Launch
I

IsThisSiteDown.org

Free tool to check whether a site is down just for you, or for everyone

Utilities
Launch
U

UptimeLog

Internet Outage Monitor for Mac

Utilities
Launch
V

Vernet

Cross platform network analysis and monitoring tool

Social
Launch

Is Online FAQ

What does is-online do?

It checks whether the internet connection is up by reaching servers on the internet, not just your local network.

Why not use navigator.onLine?

The README says navigator.onLine only tells you whether there is a local connection, not whether the internet is reachable.

Does it work in browsers?

Yes, when bundled, and only in browsers that support the fetch API.

What do the options do?

timeout sets how long to wait for a server and defaults to 5000 milliseconds. signal lets you abort the check, which then resolves to false. ipVersion picks 4 or 6, and fallbackUrls adds URLs to check.

Which Node.js version does it need?

Node.js 20 or newer.

What are the best Is Online alternatives?

Popular alternatives to Is Online include Is Reachable, Vernet and Minestat. See all Is Online alternatives

Developer Stuff

Badges