IP | 3.149.27.129 |
---|---|
HTTP Client-IP | empty |
HTTP X-Forwarded-For | empty |
Country Code | US |
---|
You can get your IP in RAW and JSON formats without any HTML and AD codes. It's useful for scripts and other system purposes
Example of getting IP in PLAIN format:
https://md5calc.com/ip.plain
Will output:
3.149.27.129
Example of getting IP in JSON format:
https://md5calc.com/ip.json
Will output:
"3.149.27.129"
For example you can use this from CLI to get your external IP when you behind the NAT
echo "My external IP:" $(curl -s https://md5calc.com/ip.plain)
Will output:
My external IP: 3.149.27.129
We have removed CORS restriction so you can use direct access to IP information in your javascript applications via AJAX.
Example:
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4 && xhr.status == 200) {
console.log('Your external IP is "'+xhr.response+'"');
};
};
xhr.open('GET', 'https://md5calc.com/ip.plain', true);
xhr.send();
Will output:
Your external IP is "3.149.27.129"