Public IP is a JavaScript package for quickly determining a device's externally visible IP address. It provides separate functions for IPv4, IPv6, or automatic detection that prefers IPv6 and falls back to IPv4. In Node.js, the package queries multiple DNS and HTTPS services to improve reliability. Browser environments use HTTPS-based public IP services instead of DNS queries. Operations are asynchronous and can be given explicit timeouts to avoid waiting indefinitely for unavailable services. AbortSignal support lets applications cancel an active lookup when it is no longer needed. A dedicated error type distinguishes cases where the package cannot determine a public address, making it useful for diagnostics, networking tools, and environment detection.

Features

  • Automatic public IP detection
  • Dedicated IPv4 and IPv6 lookup functions
  • Multiple DNS and HTTPS lookup providers
  • Node.js and browser support
  • Timeout and AbortSignal cancellation
  • Dedicated IP-not-found error handling

Project Samples

Project Activity

See All Activity >

Categories

Internet

License

MIT License

Follow public-ip

public-ip Web Site

Other Useful Business Software
Veeam Data Platform v13.1 Icon
Veeam Data Platform v13.1

Move workloads across hypervisors and clouds with no vendor lock-in. Try VDP free today.

Try Veeam Data Platform today. Experience the unified platform that's secure by design, portable by default, and proven to recover clean, fast, and anywhere.
Try Now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of public-ip!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Internet Software

Registered

2026-09-09