Get Client IP address using jQuery

In this post, find jQuery code to get Client's IP address. There are 2 free online services which allows you to get Client IP address.

: is a free utility service that returns a client's IP address in a JSON object with support for JSONP, CORS, and direct requests. It serves millions of requests each day for websites, servers, mobile devices and more from all around the world.

All you need to do is to make a call to
$(document).ready(function () {
    $.get('', function (res) {
        $('p').html('IP Address is: ' + res.ip);

: Smart IP for today is one of the leading services providing to it's users all the required information about IP-addresses and everything related to them.
$(document).ready(function () {
    $.getJSON('', function(data) {
        $('p').html('My IP Address is: ' +;
Along with the IP address, this service also provide Geo location details as well like Country, latitude, longitude etc. Following are the properties which are returned as JSON response by this service.;
Feel free to contact me for any help related to jQuery, I will gladly help you.

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..