Skip to main content
WorldIP.io

Embeddable IP Lookup Widget

Drop a one-line snippet on any page and your visitors instantly see their own public IP, ISP, ASN, country/city, and reverse-DNS (PTR) — resolved live, server-side, with no script on your end. Free. No signup. No API key. No data collection on your side.

What your visitors see

Each widget shows the viewing visitor's own connection details — not yours, not a fixed value. The data is resolved per request from the visitor's IP, so every reader sees their own:

  • IP address — their public IPv4/IPv6, linked to its full WorldIP.io profile.
  • ISP / organization — the network that owns the range.
  • ASN — the autonomous system announcing it.
  • Location — city + country, from our geolocation data.
  • PTR — live reverse-DNS hostname, when one resolves.

The widget auto-sizes to its content (no fixed-height gap) and carries a small “WorldIP.io • online” badge top-right.

Live preview — your real IP
Dark theme (default)
Light theme

Add it to your site

Pick the embed that fits your stack. Every snippet below has a one-click Copy button.

Auto-sizing script embed

RECOMMENDED

Add a target element, then load our script once. It creates the iframe for you, reads any data-* options off the element, and resizes the frame to hug the widget's content — no fixed height to guess, no trailing gap. Best when you can drop a <script> tag (most sites, themes, page builders).

<div id="worldip-widget" data-theme="dark" data-accent="0090d6"></div>
<script src="https://worldip.io/widget/js" async></script>

Set data-theme, data-accent, data-bg, and data-compact="1" on the <div> to customize (see the table below). You can place several target divs on one page — the single script handles them all.

Simple iframe embed

Pure HTML, zero JavaScript. Best for locked-down CMSes, forum signatures, or markdown that allows an <iframe> but not a <script>. You set the height yourself (150px standard, 90px compact); it won't auto-shrink the way the script embed does.

<iframe src="https://worldip.io/widget/embed"
        width="320" height="150" frameborder="0"
        style="border:0;border-radius:8px"
        title="My IP — WorldIP.io"></iframe>

Compact (IP only)

Just the IP address, no ISP/ASN/location/PTR row — a tight badge for headers, sidebars, or status bars. Use a shorter height (90px).

<iframe src="https://worldip.io/widget/embed?compact=1"
        width="320" height="90" frameborder="0"
        style="border:0;border-radius:8px"
        title="My IP — WorldIP.io"></iframe>
Live preview

Customization options

Append query parameters to the iframe src URL — or set the matching data-* attribute on the div for the script embed.

Parameter data-* attribute Values Effect
themedata-themedark | lightBase text and border colors. Default: dark.
accentdata-accent3–8 hex chars (no #)IP text + link color. Default: 0090d6 (WorldIP blue).
bgdata-bg3–8 hex chars (no #)Card background color. Overrides the theme default — match it to your site for a seamless embed.
compactdata-compact1Show the IP only (hide ISP/ASN/location/PTR). Pair with height="90".

Only color customization is exposed — no image uploads, no logo replacement. The “WorldIP.io” attribution link (top-right of the card) is always present (similar to how Google AdSense displays attribution).

Customized examples

Compact + custom accent (red)
<iframe src="https://worldip.io/widget/embed?theme=dark&amp;accent=ff4444&amp;compact=1"
        width="320" height="90" frameborder="0" style="border:0;border-radius:8px"></iframe>
Light + green accent
<iframe src="https://worldip.io/widget/embed?theme=light&amp;accent=00aa66"
        width="320" height="150" frameborder="0" style="border:0;border-radius:8px"></iframe>
Custom background (midnight purple)
<iframe src="https://worldip.io/widget/embed?theme=dark&amp;bg=1a1a2e&amp;accent=ff79c6"
        width="320" height="150" frameborder="0" style="border:0;border-radius:8px"></iframe>
Match-your-site (white bg, dark text)
<iframe src="https://worldip.io/widget/embed?theme=light&amp;bg=ffffff&amp;accent=2563eb"
        width="320" height="150" frameborder="0" style="border:0;border-radius:8px"></iframe>
Terms

By embedding this widget on your site, you and your visitors agree to the WorldIP.io Terms of Use — specifically the Embeddable widget section, which establishes that continued use constitutes ongoing consent to current and future term changes. The "Powered by WorldIP.io" attribution link must remain visible.

FAQ

Does the widget track visitors?

It only resolves the visitor's IP server-side via the standard CF-Connecting-IP header — the same way /what-is-my-ip does. We don't set cookies, fingerprint, or send analytics from inside the iframe.

Script embed or iframe — which should I use?

Use the script embed when you can add a <script> tag: it auto-sizes the frame and you configure it with data-* attributes. Use the iframe when scripts aren't allowed (some CMSes, signatures, sandboxed markdown) — you just pick a fixed height.

Can I host the widget on my own domain?

The iframe must point at https://worldip.io/widget/embed so it can resolve the visitor IP and run the lookup. The host page can be on any domain.

Does it work over HTTPS?

Yes — the widget URL is HTTPS by default. If your site is HTTPS, mixed-content rules require this anyway.

What if the visitor's IP can't be resolved?

The widget shows the IP only (no ISP/country/ASN row) and gracefully degrades. Visitors with unresolvable or private IPs still see their address.

Share