What is jsonip?
- jsonip.com is a free utility service that returns a client's IP address (IPv4 or IPv6) in a JSON object.
- By using JSONP or CORS when sending requests to jsonip.com, your web application is able to get a user's IP address directly in the browser.
- When using dynamic dns, a common use case is to automatically check if the server IP address has changed and update it.
- Millions of requests are served each day for websites, servers, and mobile devices from all around the world.
- Supports unlimited requests and is free.
- jsonip.com has been in service since November 2010.
Your IP address
44.192.115.114
Get notified!
Signup here to get notified when the jsonip Plus service is available.
Going further with jsonip Plus
With the upcoming Plus service, you get special features and even more information about your users.
- All of the free service features
- IP geo location - Country and city to within best available accuracy
- ISP Info
- Time zone data
- Full referer data
- Browser and OS info
Comments or questions?
Send them to charles@getjsonip.com or send a message
on Twitter to @jsonip.
API Help
-
Accessing this info on the api
-
Direct requestsVisit in a browser or make requests to jsonip.com directly.
-
CORS (Cross Origin Resource Sharing)To execute CORS requests, the originating request must be sent with the Origin header.
The api will respond with the "Access-Control-Allow-Origin: *" header.
Visit https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS to understand how it works.
The JavaScript Fetch api will do this when "mode: cors" is enabled.fetch('https://jsonip.com', { mode: 'cors' }) .then((resp) => resp.json()) .then((ip) => { console.log(ip); });
-
JSONPTo use JSONP, set your callback function as https://jsonip.com/myfunc or https://jsonip.com/?callback=myfunc.
myfunc({\"ip\":\"123.456.789.012\"})
-
IPv4 OnlyTo only get an IPv4 address, make requests to https://ipv4.jsonip.com.
If the client only has an IPv4 address, they will be unable to connect to https://ipv6.jsonip.com. -
IPv6 OnlyTo only get an IPv6 address, make requests to https://ipv6.jsonip.com.
Most clients that are assigned IPv6 addresses have a fallback IPv4 address.
However, if the client only has an IPv4 address, they will be unable to connect to https://ipv6.jsonip.com. -
HTTP Only (No SSL/TLS)By default all requests to jsonip.com are secured via https. For example, a request to http://jsonip.com returns a 301 redirect to https://jsonip.com.
If you need to access the api via http (non-secure), use http://no-tls.jsonip.com.