How to get ip address in jquery?

Sometimes we need to get ip address by using jquery. Today now in this post i will show you how to get ip address in jquery? We can easily get ip address in jquery by using getJSON(). If we need to get the ip address in our js file the we can use getJSON() and get ip address easily. So now in this example you can see how we can catch ip address in jquery code section.

So let’s start and try with this.

<html lang="en">
    <title>Jquery - get ip address</title>
    <script type="text/javascript" src="//"></script>

<h1>Your Ip Address : <span class="ip"></span></h1>

<script type="text/javascript">
	$.getJSON("", function (data) {


Read Also : Laravel 8 Mobile Number Verification Tutorial

Thanks for read. I hope it help you. For more you can follow us on facebook


About Shahriar Sagor

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Shahriar Sagor →