My IP Address Widget

Add a what's-my-IP box to your website. It shows visitors the public IP address their connection presents to the internet, labels it as IPv4 or IPv6 and lets them copy it, with a short explanation of what the address is.

Website & Security Tool Live data via A2Z Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/my-ip-address" title="My IP Address by A2Z Tools" width="100%" height="340" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

Opening the widget sends one request to A2Z's own endpoint, which replies with the address it sees for that request. The widget validates the reply before showing it: a well-formed IPv4 or IPv6 address is required, and an IPv4 address wrapped in IPv6 notation (::ffff:203.0.113.5) is shown as the plain IPv4 address it stands for. Visitors can copy it or check again - useful after switching a VPN on or off. If the lookup fails or is rate-limited, a clear message and a retry button appear instead of an empty box.

Method

  • GET /api/embed/whoami (same origin, no cookies) returns { ip, version }
  • IPv4 = four decimal octets 0-255 without leading zeros; IPv6 = up to eight hex groups with at most one ::
  • ::ffff:a.b.c.d is displayed as the IPv4 address a.b.c.d

Limitations

  • Shows the address A2Z's server sees; behind a proxy, VPN, corporate gateway or carrier-grade NAT that is not an address belonging to the visitor's own device.
  • One address per request: a dual-stack connection has both an IPv4 and an IPv6 address, but only the one the browser used for this request is shown.
  • No location, ISP or reputation lookup is performed.

Where publishers use it

  • IT support pages where staff need a user's public IP to allow-list or troubleshoot
  • VPN and privacy blogs demonstrating how a VPN changes the visible address
  • Hosting and SaaS help centres that ask customers for their IP when configuring firewall rules
  • Networking tutorials explaining public versus private addresses

Questions

Is this my device's own address?

Usually not. Home and mobile networks share one public address between many devices through NAT, so this is the address of your router or your provider's gateway, not your computer's local address.

Why does it change when I use a VPN?

A VPN or proxy sends your traffic out through its own servers, so websites see the VPN's address instead of yours - which is the point of using one.

Why do I see IPv6 instead of IPv4?

If your connection supports IPv6, browsers usually prefer it. The widget shows whichever address your connection actually used for the request.

Does A2Z keep the address?

The endpoint only reflects the address back to the visitor and does not log or store it. Like any web server, standard infrastructure may process it transiently to deliver the response.

Sources

  1. RFC 4291 - IP Version 6 Addressing Architecture (section 2.5.5.2, IPv4-mapped addresses) - IETF . ::ffff:a.b.c.d form shown as plain IPv4
  2. RFC 5952 - A Recommendation for IPv6 Address Text Representation - IETF . Text form of IPv6 addresses

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools My IP Address
https://a2z.tools/what-is-my-ip-address

Preview