An IP address is essentially your device's "address" on the internet — whenever you visit a website, the server on the other end can see which address the request came from. But does the browser itself know its own IP?
Surprisingly, there's no browser API for that. Only the server that receives your request can see your IP. The browser has no built-in way to ask "what's my IP?"
So this tool works by sending a request to /api/ip when the page loads. A Vercel serverless function reads the x-forwarded-for or x-real-ip headers from the incoming request and returns the IP as JSON. When traffic passes through a CDN or proxy, x-forwarded-for may contain a chain of IPs — we take the first one, which is your original address.
The tool also detects whether the address is IPv4 (like 203.0.113.1) or IPv6 (like 2001:db8::1) and shows the type alongside the address.