JSON, CSV, XML, YAML: Data Formats Compared
Why we need structured data formats, how JSON, CSV, XML, and YAML differ, and when to choose each one.
Every device connected to the internet has an address — a unique number that lets data find its way to the right machine across billions of possible destinations. But what do those numbers actually mean, why are we running out of them, and how can a website guess your city just by seeing your connection? The answers start with how IP addresses work.
An IPv4 address is a 32-bit number, written as four decimal numbers separated by dots. Each number (called an octet) ranges from 0 to 255, representing one byte of the address.
192.168.1.1
Each octet is 8 bits:
192 . 168 . 1 . 1
11000000 10101000 00000001 00000001
Total: 32 bits = 2^32 = 4,294,967,296 possible addresses4.3 billion addresses seemed like an inexhaustible supply when the internet was designed in the 1980s. But with smartphones, IoT devices, and cloud servers, we blew through them. IANA allocated the last IPv4 blocks in 2011. We've been surviving on workarounds ever since.
IPv6 uses 128-bit addresses — four times the bits of IPv4. The number of possible IPv6 addresses is astronomical: 340 undecillion (3.4 × 1038). That's roughly 100 addresses for every atom on Earth's surface.
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Written in eight groups of four hexadecimal digits.
Leading zeros can be omitted, consecutive zero groups
replaced with "::"
Shortened: 2001:db8:85a3::8a2e:370:7334| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Format | Decimal (192.168.1.1) | Hex (2001:db8::1) |
| Total addresses | 4.3 billion | 340 undecillion |
| NAT required | Usually yes | No (by design) |
| Adoption (2024) | ~60% of traffic | ~40% of traffic |
| Header complexity | Variable length | Fixed 40 bytes |
Your laptop doesn't have a public IPv4 address. Neither does your phone, your smart TV, or your thermostat. They all share the same public IP — the one assigned to your router by your ISP. Inside your home network, each device gets a private IP (typically starting with 192.168. or 10.).
This sharing is called NAT (Network Address Translation). Your router translates between the private addresses on your local network and the single public address the internet sees. It's the reason IPv4 has survived past its expiration date — millions of devices hide behind a single public IP.
10.0.0.0 – 10.255.255.255 (10/8 prefix)
172.16.0.0 – 172.31.255.255 (172.16/12 prefix)
192.168.0.0 – 192.168.255.255 (192.168/16 prefix)
These addresses never appear on the public internet.
If you see them, you're looking at a local network.Websites can estimate your physical location from your IP address alone, without GPS or browser permissions. How? Through geolocation databases that map IP ranges to geographic regions.
These databases are built from multiple sources:
A VPN (Virtual Private Network) encrypts your traffic and routes it through a server in another location. The websites you visit see the VPN server's IP address, not yours. This makes geolocation report the VPN server's location instead of your actual one.
This is why streaming services try to detect and block VPNs — users in one country can appear to be in another. It's also why checking “What's my IP?” while connected to a VPN shows a different address and location than your real one.
Your IP address is your return address on the internet. It tells servers where to send responses — and, roughly, where in the world you're connecting from.
Why we need structured data formats, how JSON, CSV, XML, and YAML differ, and when to choose each one.
Simple vs compound interest, the Rule of 72, how compounding frequency matters, and why APY and APR are not the same thing.
Marginal vs effective tax rates, how US federal brackets are calculated, FICA deductions, pre-tax benefits, and sales tax models.