On this page
ipstack returns full geolocation for public IPs. The free plan is 100 requests a month.
Get a free API keyThere are three private IP address ranges, defined by RFC 1918: Class A spans 10.0.0.0 to 10.255.255.255 (10.0.0.0/8, about 16.7 million addresses, used by large enterprises), Class B spans 172.16.0.0 to 172.31.255.255 (172.16.0.0/12, about 1 million addresses, used by medium networks), and Class C spans 192.168.0.0 to 192.168.255.255 (192.168.0.0/16, 65,536 addresses, used by home and small office networks). Private IPs work only inside local networks; NAT translates them to a public IP for internet access. Note that “classes” is legacy terminology: modern networking defines these ranges in CIDR notation.
127.0.0.1 (loopback, your own device) and 169.254.0.0/16 (link-local APIPA addresses a device self-assigns when DHCP fails).| Class (legacy name) | Range | CIDR | Addresses | Typical use |
|---|---|---|---|---|
| Class A | 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | 16,777,216 | Large enterprises, cloud VPCs |
| Class B | 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | 1,048,576 | Universities, medium businesses |
| Class C | 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | 65,536 | Home and small office routers |
This guide covers the three RFC 1918 ranges under the class names people search for. For the complete list including CGNAT, link-local, loopback and IPv6, and for how to find your own private address, see private IP addresses.
These ranges are formally reserved by RFC 1918, published by the IETF in 1996, which is why you will often see private addresses called “RFC 1918 addresses” in networking documentation.
Strictly speaking, IP “classes” belong to the classful addressing system that the internet retired in 1993 in favor of CIDR; the class names survive as convenient labels for the three RFC 1918 ranges.
Range: 10.0.0.0 to 10.255.255.255 (10.0.0.0/8). Class A is employed by large network connections with up to 24 bits for hosts and 8 bits for networks. With 16,777,216 usable addresses it is the largest private block, which is why cloud providers default to it for VPCs and why almost every large corporate network is built on 10.x.
Range: 172.16.0.0 to 172.31.255.255 (172.16.0.0/12). Class B is employed for mid-scale networks. It provides 1,048,576 addresses using 12 network bits and 20 host bits. Note the boundary carefully: the block ends at 172.31.255.255. Anything from 172.32.0.0 upward is public address space.
Range: 192.168.0.0 to 192.168.255.255 (192.168.0.0/16). Small networks employ Class C. It provides 65,536 addresses using 16 network bits and 16 host bits, and it is the range you will see on virtually every home router, typically as a /24 subnet such as 192.168.1.0/24 with the router itself at 192.168.1.1.
Your device’s network settings show your private IP address directly — Windows, macOS, iPhone and Android all expose it under their Wi-Fi or network details screens (see private IP addresses for the full walkthrough on each). For your public IP — the one the rest of the internet actually sees — query an API instead:
https://api.ipstack.com/check?access_key=YOUR_ACCESS_KEY// response includes your public IP plus location data: // "ip": "134.201.250.155", "country_code": "US", "city": "Los Angeles", ...
Note the distinction: the API returns your public IP (the one websites see after NAT), while the device settings above show your private IP inside your local network. You always have both.
The free plan is 100 requests a month.
These are the highest-demand questions and prompt patterns people type into Google and AI assistants about private IPs right now.
The three RFC 1918 private ranges are 10.0.0.0 to 10.255.255.255 (10.0.0.0/8), 172.16.0.0 to 172.31.255.255 (172.16.0.0/12), and 192.168.0.0 to 192.168.255.255 (192.168.0.0/16). Any address inside these ranges is private and cannot be routed on the public internet.
Yes. 192.168.1.1 falls inside the 192.168.0.0/16 private range and is one of the most common default gateway addresses for home routers. Typing it into a browser on your own network usually opens your router’s admin page.
Check whether it falls in a reserved range: anything starting with 10., anything from 172.16. through 172.31., and anything starting with 192.168. is private; 127.x is loopback and 169.254.x is link-local. Everything else is public. Programmatically, an IPstack lookup on a public IP returns full geolocation, while private ranges are non-routable and carry no location.
Because your router assigned you an address from the 192.168.0.0/16 private range via DHCP, which is the default on nearly every consumer router. Your internet traffic still reaches the web through the router’s public IP using NAT.
A pattern that works well with AI coding assistants. Naming the exact ranges and API fields is the biggest quality lever.
Write a [Python/JavaScript] function that takes an IP address, returns whether it is private (RFC 1918), loopback, link-local, or public, and for public IPs calls the IPstack API (key in an environment variable) to return country_code, city, and connection type, with error handling for invalid input.
No. Routers on the public internet are configured to drop traffic to and from the RFC 1918 ranges. A device on a private address reaches the internet only through NAT, which substitutes the router’s public IP on the way out.
Functionally yes; all three are private and behave identically. The choice is about size and convention: 10.0.0.0/8 for large or cloud networks, 172.16.0.0/12 for mid-size networks, 192.168.0.0/16 for home and small office.
Every reserved range including CGNAT, link-local and IPv6, plus how to find your own.
Read the guide →Address assignmentStatic versus dynamic, when you need each, and how to pin an address on your own network.
Read the guide →API referenceThe base URL, the three endpoints and every field a lookup returns.
Read the guide →