-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathip-lookup.html
More file actions
1252 lines (1128 loc) · 66.2 KB
/
Copy pathip-lookup.html
File metadata and controls
1252 lines (1128 loc) · 66.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Free IP Lookup — Subnet Calculator IPv4/IPv6 | FreeDevTool</title>
<meta name="description" content="Free IP & subnet calculator. Validate IPv4/IPv6, calculate CIDR, network/broadcast addresses, host ranges, RFC 1918. Runs offline in browser.">
<meta name="robots" content="index, follow">
<meta name="author" content="Anees Ur Rehman">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","datePublished":"2026-05-02","dateModified":"2026-05-19","inLanguage":"en-US","isPartOf":{"@type":"WebSite","name":"FreeDevTool","url":"https://freedevtool.org"}}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Person","name":"Anees Ur Rehman","url":"https://freedevtool.org/about","jobTitle":"Full-stack developer","worksFor":{"@type":"Organization","name":"FreeDevTool","url":"https://freedevtool.org"}}</script>
<link rel="canonical" href="https://freedevtool.org/ip-lookup">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@300;400;500;600&display=swap" as="style">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@300;400;500;600&display=swap">
<link rel="preload" href="style.css?v=20260502-cards" as="style">
<link rel="stylesheet" href="style.css?v=20260502-cards">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/favicon.svg">
<meta property="og:image" content="https://freedevtool.org/og-image.svg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="FreeDevTool — 50+ free, fast, privacy-first developer tools">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://freedevtool.org/og-image.svg">
<meta name="twitter:title" content="IP Lookup & Subnet Calculator — IPv4/IPv6">
<meta name="twitter:description" content="Validate IP addresses, calculate subnets & CIDR. IPv4 + IPv6, RFC 1918 detection. Runs offline, no API calls.">
<!-- Google Analytics 4 -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-3L0CMH3X36"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-3L0CMH3X36');
</script>
<meta property="og:title" content="IP Address Lookup & Subnet Calculator — Free Online Tool">
<meta property="og:description" content="Validate IPv4/IPv6 addresses, calculate subnets, find network addresses and host ranges. Free IP analyzer for developers.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://freedevtool.org/ip-lookup">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "IP Address Lookup & Subnet Calculator",
"url": "https://freedevtool.org/ip-lookup",
"description": "Validate and analyze IPv4/IPv6 addresses, calculate subnets with CIDR notation. Free online IP address lookup and subnet calculator for developers.",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Any",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" }
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "How do I find information about an IP address?",
"acceptedAnswer": { "@type": "Answer", "text": "Enter any IPv4 or IPv6 address into the analyzer above to instantly see its version, binary/decimal/hex representations, classification (private, public, loopback, link-local, multicast), and IP class. Add a CIDR prefix length (e.g. /24) to calculate subnet details including network address, broadcast address, usable host range, subnet mask, and wildcard mask. All processing happens locally in your browser — no data is sent to any server." }
},
{
"@type": "Question",
"name": "What is the difference between IPv4 and IPv6?",
"acceptedAnswer": { "@type": "Answer", "text": "IPv4 uses 32-bit addresses written as four decimal octets (e.g. 192.168.1.1), providing about 4.3 billion unique addresses. IPv6 uses 128-bit addresses written as eight groups of four hexadecimal digits separated by colons (e.g. 2001:0db8::1), providing approximately 340 undecillion addresses. IPv6 was created to solve IPv4 address exhaustion and includes improvements like built-in IPsec support, simplified headers, and no need for NAT." }
},
{
"@type": "Question",
"name": "What are private IP address ranges (RFC 1918)?",
"acceptedAnswer": { "@type": "Answer", "text": "RFC 1918 defines three private IPv4 address ranges that are not routable on the public internet: 10.0.0.0/8 (10.0.0.0 – 10.255.255.255, ~16.7 million addresses), 172.16.0.0/12 (172.16.0.0 – 172.31.255.255, ~1 million addresses), and 192.168.0.0/16 (192.168.0.0 – 192.168.255.255, ~65,000 addresses). These are used for local networks behind NAT routers. Other reserved ranges include 127.0.0.0/8 for loopback and 169.254.0.0/16 for link-local." }
},
{
"@type": "Question",
"name": "How does CIDR notation and subnetting work?",
"acceptedAnswer": { "@type": "Answer", "text": "CIDR (Classless Inter-Domain Routing) notation appends a prefix length to an IP address (e.g. 192.168.1.0/24). The prefix length indicates how many leading bits define the network portion. A /24 means the first 24 bits are the network part, leaving 8 bits for host addresses (256 addresses, 254 usable). Subnetting divides a larger network into smaller segments: a /24 can be split into two /25 subnets (128 addresses each) or four /26 subnets (64 addresses each)." }
},
{
"@type": "Question",
"name": "What is a subnet mask and how do I calculate it?",
"acceptedAnswer": { "@type": "Answer", "text": "A subnet mask is a 32-bit number that separates the network and host portions of an IP address. It has consecutive 1-bits for the network part and 0-bits for the host part. For example, /24 = 255.255.255.0 (24 ones followed by 8 zeros in binary). The wildcard mask is the inverse: 0.0.0.255. To find the network address, perform a bitwise AND between the IP and subnet mask. The broadcast address is the network address with all host bits set to 1." }
},{"@type":"Question","name":"What is my public IP address?","acceptedAnswer":{"@type":"Answer","text":"Your public IP is the address your ISP assigns to your router, visible to every site you visit. Different from your private IP (the 192.168.x.x or 10.x.x.x address inside your local network). This tool displays both your IPv4 and IPv6 public addresses."}},{"@type":"Question","name":"What is the difference between IPv4 and IPv6?","acceptedAnswer":{"@type":"Answer","text":"IPv4 uses 32-bit addresses (4.3 billion possible values, 4 decimal octets). IPv6 uses 128-bit addresses (340 undecillion values, 8 hex groups). IPv4 exhausted around 2011; IPv6 is the long-term replacement. Modern networks support both via dual-stack."}},{"@type":"Question","name":"How accurate is IP geolocation?","acceptedAnswer":{"@type":"Answer","text":"Country-level: about 99% accurate. Region/state: about 80%. City: 55-80% depending on provider and IP class. Mobile IPs (CGNAT) and CDN edge node IPs can place users far from their real location. Use geolocation for content variants, not compliance decisions."}}
]
}
</script>
<style>
.ip-input-row {
display: flex;
gap: 10px;
align-items: flex-end;
}
.ip-input-row .ip-field { flex: 1; }
.ip-input-row .cidr-field { width: 100px; flex-shrink: 0; }
@media (max-width: 480px) {
.ip-input-row { flex-direction: column; align-items: stretch; }
.ip-input-row .cidr-field { width: 100%; }
}
.quick-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-examples button {
font-family: var(--mono);
font-size: 11px;
padding: 5px 10px;
background: var(--bg3);
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text2);
cursor: pointer;
transition: border-color .2s, color .2s;
}
.quick-examples button:hover {
border-color: var(--accent);
color: var(--accent);
}
.ip-result-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
margin-top: 14px;
}
@media (max-width: 560px) {
.ip-result-grid { grid-template-columns: 1fr; }
}
.ip-result-cell {
background: var(--bg3);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 12px 14px;
}
.ip-result-cell.full-width {
grid-column: 1 / -1;
}
.ip-result-label {
font-family: var(--mono);
font-size: 10px;
color: var(--text3);
text-transform: uppercase;
letter-spacing: .5px;
margin-bottom: 4px;
}
.ip-result-value {
font-family: var(--mono);
font-size: 13px;
color: var(--text);
word-break: break-all;
line-height: 1.5;
cursor: pointer;
transition: color .2s;
}
.ip-result-value:hover { color: var(--accent); }
.ip-badge {
display: inline-block;
font-family: var(--mono);
font-size: 10px;
font-weight: 600;
padding: 3px 8px;
border-radius: 4px;
text-transform: uppercase;
letter-spacing: .3px;
}
.ip-badge.badge-public { background: rgba(52,199,89,.15); color: #34c759; }
.ip-badge.badge-private { background: rgba(255,159,10,.15); color: #ff9f0a; }
.ip-badge.badge-loopback { background: rgba(94,92,230,.15); color: #5e5ce6; }
.ip-badge.badge-linklocal { background: rgba(0,122,255,.15); color: #007aff; }
.ip-badge.badge-multicast { background: rgba(255,55,95,.15); color: #ff375f; }
.ip-badge.badge-reserved { background: rgba(172,142,104,.15); color: #ac8e68; }
.section-divider {
border: none;
border-top: 1px solid var(--border);
margin: 20px 0;
}
.subnet-section-title {
font-family: var(--mono);
font-size: 12px;
font-weight: 600;
color: var(--accent);
text-transform: uppercase;
letter-spacing: .5px;
margin-bottom: 10px;
}
.ref-table {
width: 100%;
border-collapse: collapse;
font-family: var(--mono);
font-size: 12px;
margin-top: 14px;
}
.ref-table th {
text-align: left;
font-size: 10px;
text-transform: uppercase;
letter-spacing: .5px;
color: var(--text3);
padding: 8px 10px;
border-bottom: 1px solid var(--border);
}
.ref-table td {
padding: 8px 10px;
color: var(--text2);
border-bottom: 1px solid var(--border);
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table tr:hover td { color: var(--text); }
#ip-analysis, #subnet-results { display: none; }
</style>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://freedevtool.org/"
},
{
"@type": "ListItem",
"position": 2,
"name": "All Tools",
"item": "https://freedevtool.org/all-tools"
},
{
"@type": "ListItem",
"position": 3,
"name": "IP Address Lookup & Analyzer",
"item": "https://freedevtool.org/ip-lookup"
}
]
}
</script>
<script src="/ga4-events.js" defer></script>
</head>
<body>
<nav>
<a class="nav-logo" href="/" aria-label="FreeDevTool home"><svg class="logo-mark" width="22" height="22" viewBox="0 0 24 24" aria-hidden="true" fill="none"><rect x="1" y="1" width="22" height="22" rx="6" fill="currentColor" opacity=".12"/><path d="M9.5 8.5L6 12l3.5 3.5M14.5 8.5L18 12l-3.5 3.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>FreeDevTool</a>
<div class="nav-links">
<div class="nav-dropdown" id="tools-dropdown">
<a href="all-tools" onclick="event.preventDefault();this.parentElement.classList.toggle('open')" aria-haspopup="true">Tools <svg class="chev" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg></a>
<div class="nav-dropdown-menu">
<a href="encoding-tools">
<div class="dd-icon">b64</div>
<div class="dd-info"><div class="dd-name">Encoding & Conversion</div><div class="dd-count">11 tools · Base64, YAML, px→rem</div></div>
</a>
<a href="generation-tools">
<div class="dd-icon">{ }</div>
<div class="dd-info"><div class="dd-name">Generation & Formatting</div><div class="dd-count">16 tools · JSON, SQL, gradients</div></div>
</a>
<a href="security-tools">
<div class="dd-icon">#</div>
<div class="dd-info"><div class="dd-name">Security & Hashing</div><div class="dd-count">3 tools · JWT, MD5, SHA</div></div>
</a>
<a href="text-tools">
<div class="dd-icon">.*</div>
<div class="dd-info"><div class="dd-name">Code & Text Tools</div><div class="dd-count">9 tools · Regex, diff, tokens</div></div>
</a>
<a href="devops-tools">
<div class="dd-icon">JS</div>
<div class="dd-info"><div class="dd-name">Optimization & DevOps</div><div class="dd-count">7 tools · Minifiers, cURL, git</div></div>
</a>
<a href="network-tools">
<div class="dd-icon">IP</div>
<div class="dd-info"><div class="dd-name">Network & Time</div><div class="dd-count">4 tools · IP, DNS, timestamps</div></div>
</a>
<a href="seo-tools">
<div class="dd-icon">SEO</div>
<div class="dd-info"><div class="dd-name">SEO & Meta Tools</div><div class="dd-count">3 tools · OG, meta, slug</div></div>
</a>
<div class="nav-dropdown-divider"></div>
<a class="dd-all" href="all-tools">
<div class="dd-icon">All</div>
<div class="dd-info"><div class="dd-name">Browse all 50 tools</div><div class="dd-count">Searchable catalog & categories</div></div>
</a>
</div>
</div>
<a href="/guides">Guides</a>
<a href="about">About</a>
<a href="privacy">Privacy</a>
</div>
</nav>
<div id="copy-toast">Copied!</div>
<div class="wrapper">
<a class="tool-back" href="/" aria-label="Back to home">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15 18l-6-6 6-6"/></svg>
Back
</a>
<div class="tool-header">
<div class="tool-badge">Network Tool</div>
<h1>IP Lookup & Subnet Calculator</h1>
<p class="tool-description">
Validate IPv4/IPv6, calculate CIDR subnets, find network/broadcast addresses and host ranges. Detects <a href="https://datatracker.ietf.org/doc/html/rfc1918" rel="noopener" style="color:var(--accent)">RFC 1918</a> private ranges. Runs offline in your browser — no external API, no IP geolocation, no logs.
</p>
<div class="last-updated">Last updated: May 2026 · Written by <a href="/about">Anees Ur Rehman</a>, full-stack developer</div>
</div>
<div class="tool-card">
<div class="tool-card-header">
<div class="dot dot-red"></div>
<div class="dot dot-yellow"></div>
<div class="dot dot-green"></div>
<span class="tool-card-title">ip-lookup.tool</span>
</div>
<div class="tool-body">
<label>IP Address</label>
<div class="ip-input-row">
<div class="ip-field">
<input type="text" id="ip-input" placeholder="e.g. 192.168.1.1 or 2001:db8::1" oninput="analyze()" spellcheck="false" autocomplete="off">
</div>
<div class="cidr-field">
<input type="text" id="cidr-input" placeholder="/ CIDR" oninput="analyze()" spellcheck="false" autocomplete="off">
</div>
</div>
<div class="quick-examples">
<button onclick="loadExample('192.168.1.1','24')">192.168.1.1/24</button>
<button onclick="loadExample('10.0.0.0','8')">10.0.0.0/8</button>
<button onclick="loadExample('172.16.0.0','12')">172.16.0.0/12</button>
<button onclick="loadExample('8.8.8.8','32')">8.8.8.8/32</button>
<button onclick="loadExample('::1','')">::1</button>
</div>
<!-- IP Analysis Results -->
<div id="ip-analysis">
<hr class="section-divider">
<div class="subnet-section-title">IP Address Analysis</div>
<div class="ip-result-grid" id="ip-info-grid"></div>
</div>
<!-- Subnet Results -->
<div id="subnet-results">
<hr class="section-divider">
<div class="subnet-section-title">Subnet Calculation</div>
<div class="ip-result-grid" id="subnet-grid"></div>
</div>
<!-- Reference Table -->
<hr class="section-divider">
<div class="subnet-section-title">Common Private IP Ranges Reference</div>
<div style="overflow-x:auto">
<table class="ref-table">
<thead>
<tr>
<th>Range</th>
<th>CIDR</th>
<th>Type</th>
<th>Addresses</th>
</tr>
</thead>
<tbody>
<tr><td>10.0.0.0 – 10.255.255.255</td><td>10.0.0.0/8</td><td>Private (RFC 1918)</td><td>16,777,216</td></tr>
<tr><td>172.16.0.0 – 172.31.255.255</td><td>172.16.0.0/12</td><td>Private (RFC 1918)</td><td>1,048,576</td></tr>
<tr><td>192.168.0.0 – 192.168.255.255</td><td>192.168.0.0/16</td><td>Private (RFC 1918)</td><td>65,536</td></tr>
<tr><td>127.0.0.0 – 127.255.255.255</td><td>127.0.0.0/8</td><td>Loopback</td><td>16,777,216</td></tr>
<tr><td>169.254.0.0 – 169.254.255.255</td><td>169.254.0.0/16</td><td>Link-Local</td><td>65,536</td></tr>
<tr><td>224.0.0.0 – 239.255.255.255</td><td>224.0.0.0/4</td><td>Multicast</td><td>268,435,456</td></tr>
<tr><td>240.0.0.0 – 255.255.255.255</td><td>240.0.0.0/4</td><td>Reserved</td><td>268,435,456</td></tr>
<tr><td>::1/128</td><td>::1/128</td><td>IPv6 Loopback</td><td>1</td></tr>
<tr><td>fe80::/10</td><td>fe80::/10</td><td>IPv6 Link-Local</td><td>~1.2×10<sup>24</sup></td></tr>
<tr><td>fc00::/7</td><td>fc00::/7</td><td>IPv6 Unique Local</td><td>~5.9×10<sup>37</sup></td></tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- =============================================================
LONG-FORM ARTICLE — comprehensive guide for E-E-A-T + ranking.
============================================================= -->
<article>
<p class="aeo-lead" style="font-size:16px;line-height:1.7;color:var(--text);max-width:760px;margin:24px auto 18px;padding:0 4px">
<strong>IP address lookup</strong> resolves your public IP to geolocation, ASN, ISP, and proxy/VPN detection. Country-level geolocation is ~99% accurate, city-level is 50-80% depending on provider and IP class. Both IPv4 and IPv6 should be checked — many users have only one configured. This <strong>free IP lookup</strong> shows both addresses and detects whether you are behind a known VPN or proxy.
</p>
<section id="examples" style="max-width:760px;margin:24px auto 32px">
<h2 style="font-size:18px;margin-bottom:14px">Examples</h2>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">IPv4 vs IPv6 formats§§IPv4: 93.184.216.34 (32 bits, 4 octets)§§IPv6: 2606:2800:220:1::1946 (128 bits, 8 hex groups, :: collapses zeros)</strong>
</div>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">Geolocation accuracy§§Country accuracy: ~99%§§Region/state: ~80%§§City: 55-80% depending on provider and IP class. Mobile and CDN IPs are often inaccurate.</strong>
</div>
<div style="background:var(--bg3);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px">
<strong style="display:block;color:var(--accent);font-family:var(--mono);font-size:11px;text-transform:uppercase;letter-spacing:1px;margin-bottom:6px">VPN detection§§Modern lookup services maintain databases of known VPN/proxy IP ranges. Detection is heuristic — a known datacenter IP is likely a VPN; a residential IP from a known VPN provider also flags. Detection rates are 70-90% for popular VPNs.</strong>
</div>
</section>
<aside class="founder-note" style="max-width:760px;margin:24px auto 32px;padding:20px 24px;background:rgba(0,208,132,0.05);border-left:3px solid var(--accent);border-radius:6px;font-size:14px;line-height:1.7;color:var(--text2)"><div style="font-family:var(--mono);font-size:11px;color:var(--accent);letter-spacing:1.5px;text-transform:uppercase;margin-bottom:10px;font-weight:600">💡 Why I built this</div><p style="margin:0 0 12px">I built this because the what-is-my-IP sites online either show only IPv4 (skipping IPv6 in 2026?), wrap the lookup in ads, or sell your IP to advertising networks. This tool shows IPv4 and IPv6, geolocation accuracy with explicit confidence levels (city-level vs country-level), ASN, ISP, and whether you are using a known VPN or proxy. No third-party tracking attached.</p><p style="margin:0;font-size:13px;color:var(--text3)">— <a href="/about" style="color:var(--accent);text-decoration:none">Anees Ur Rehman</a>, full-stack developer</p></aside>
<section class="article-section">
<h2>What is an IP address and how does subnet math work?</h2>
<p>An <strong>IP address</strong> (Internet Protocol address) is the numerical identifier assigned to every device on a network. It has two roles fused together: identifying <em>which network</em> a device is on, and identifying <em>which device</em> on that network. The split between "network part" and "host part" is determined by the <strong>subnet mask</strong> (in IPv4) or <strong>prefix length</strong> (in IPv6 and modern CIDR notation).</p>
<p>The internet runs on two parallel address systems:</p>
<ul>
<li><strong>IPv4</strong> — 32-bit addresses, written as four decimal octets (<code>192.168.1.42</code>). 4.3 billion possible addresses, exhausted at the ARIN/RIPE level since 2011. Still dominant on the public internet (~75% of traffic in 2026).</li>
<li><strong>IPv6</strong> — 128-bit addresses, written as eight hexadecimal groups (<code>2001:db8::1</code>). 340 undecillion addresses — effectively unlimited. Native on most ISPs, mobile networks, and AWS/GCP/Azure default subnets in 2026.</li>
</ul>
<p>Subnet calculations let network engineers split a large address block into smaller, isolated networks. <strong>CIDR notation</strong> (<code>192.168.0.0/24</code>) is the modern way to express this: the number after the slash is the prefix length — how many bits of the address identify the network. Higher number = smaller subnet.</p>
</section>
<section class="article-section">
<h2>CIDR cheat sheet — common subnet sizes</h2>
<table class="ref-table">
<thead><tr><th>CIDR</th><th>Subnet mask (IPv4)</th><th>Total addresses</th><th>Usable hosts</th><th>Common use</th></tr></thead>
<tbody>
<tr><td><code>/8</code></td><td>255.0.0.0</td><td>16,777,216</td><td>16,777,214</td><td>Massive ISP allocation; <code>10.0.0.0/8</code> private range</td></tr>
<tr><td><code>/12</code></td><td>255.240.0.0</td><td>1,048,576</td><td>1,048,574</td><td><code>172.16.0.0/12</code> private range</td></tr>
<tr><td><code>/16</code></td><td>255.255.0.0</td><td>65,536</td><td>65,534</td><td>Class B; <code>192.168.0.0/16</code> private range</td></tr>
<tr><td><code>/20</code></td><td>255.255.240.0</td><td>4,096</td><td>4,094</td><td>Mid-size enterprise subnet</td></tr>
<tr><td><code>/24</code></td><td>255.255.255.0</td><td>256</td><td>254</td><td>Standard LAN — most home/office networks</td></tr>
<tr><td><code>/27</code></td><td>255.255.255.224</td><td>32</td><td>30</td><td>Small department, AWS subnet minimum</td></tr>
<tr><td><code>/28</code></td><td>255.255.255.240</td><td>16</td><td>14</td><td>Tiny VLAN, small DMZ</td></tr>
<tr><td><code>/30</code></td><td>255.255.255.252</td><td>4</td><td>2</td><td>Point-to-point links between routers</td></tr>
<tr><td><code>/31</code></td><td>255.255.255.254</td><td>2</td><td>2 (RFC 3021)</td><td>Modern point-to-point — uses both addresses</td></tr>
<tr><td><code>/32</code></td><td>255.255.255.255</td><td>1</td><td>1</td><td>Single host (e.g. firewall rule for one server)</td></tr>
</tbody>
</table>
<p><strong>Why "usable hosts" is 2 less than total:</strong> the first address in any subnet is the <strong>network address</strong> (not assignable to a host) and the last is the <strong>broadcast address</strong>. A <code>/24</code> has 256 addresses but only 254 are usable on hosts. Modern <code>/31</code> subnets are an exception — RFC 3021 lets both addresses be used on point-to-point links.</p>
</section>
<section class="article-section">
<h2>Private vs public IP ranges (RFC 1918)</h2>
<p>Three IPv4 ranges are reserved for <strong>private use</strong> — they're not routed on the public internet, so multiple organizations can use them simultaneously without conflict. Defined in <a href="https://datatracker.ietf.org/doc/html/rfc1918" rel="noopener">RFC 1918</a>:</p>
<table class="ref-table">
<thead><tr><th>Range</th><th>CIDR</th><th>Address count</th><th>Common use</th></tr></thead>
<tbody>
<tr><td><code>10.0.0.0 – 10.255.255.255</code></td><td><code>10.0.0.0/8</code></td><td>16,777,216</td><td>Big enterprises, AWS default VPC, Kubernetes pods</td></tr>
<tr><td><code>172.16.0.0 – 172.31.255.255</code></td><td><code>172.16.0.0/12</code></td><td>1,048,576</td><td>Docker default bridge network, mid-size companies</td></tr>
<tr><td><code>192.168.0.0 – 192.168.255.255</code></td><td><code>192.168.0.0/16</code></td><td>65,536</td><td>Almost every home router (especially <code>192.168.0.0/24</code> and <code>192.168.1.0/24</code>)</td></tr>
</tbody>
</table>
<h3>Other reserved IPv4 ranges to know</h3>
<table class="ref-table">
<thead><tr><th>Range</th><th>Purpose</th></tr></thead>
<tbody>
<tr><td><code>0.0.0.0/8</code></td><td>"This network" — wildcard binding</td></tr>
<tr><td><code>127.0.0.0/8</code></td><td>Loopback (localhost). <code>127.0.0.1</code> is the most famous IP.</td></tr>
<tr><td><code>169.254.0.0/16</code></td><td>Link-local / APIPA — auto-assigned when DHCP fails</td></tr>
<tr><td><code>224.0.0.0/4</code></td><td>Multicast (one-to-many)</td></tr>
<tr><td><code>100.64.0.0/10</code></td><td>Carrier-grade NAT (CGNAT) — used by mobile/cable ISPs</td></tr>
</tbody>
</table>
</section>
<section class="article-section">
<h2>How subnet math actually works (with examples)</h2>
<h3>Example: parsing <code>192.168.50.130/27</code></h3>
<div class="lang-block">
<div class="lang-block-header">subnet-math</div>
<pre><code>Address (decimal): 192 . 168 . 50 . 130
Address (binary): 11000000.10101000.00110010.10000010
Prefix /27: 11111111.11111111.11111111.11100000 (27 ones)
└────────── network ──────────┘└host┘
Network address (AND): 11000000.10101000.00110010.10000000 = 192.168.50.128
Broadcast (OR): 11000000.10101000.00110010.10011111 = 192.168.50.159
First usable host: 192.168.50.129
Last usable host: 192.168.50.158
Usable hosts: 30 (32 total − network − broadcast)
Subnet mask: 255.255.255.224
Wildcard mask: 0.0.0.31</code></pre>
</div>
<h3>Quick mental shortcuts</h3>
<ul>
<li><strong>Subnet size doubles every −1 to the prefix.</strong> <code>/24</code> = 256, <code>/23</code> = 512, <code>/22</code> = 1024.</li>
<li><strong>The prefix tells you the boundary.</strong> A <code>/27</code> aligns to multiples of 32 (256/8 = 32). Subnets start at .0, .32, .64, .96, .128...</li>
<li><strong>Wildcard mask = inverse of subnet mask.</strong> Subnet <code>255.255.255.224</code> ↔ wildcard <code>0.0.0.31</code>. Cisco ACLs use wildcard masks.</li>
<li><strong>Two adjacent subnets can be merged.</strong> <code>192.168.0.0/25</code> + <code>192.168.0.128/25</code> = <code>192.168.0.0/24</code>. This is "supernetting."</li>
</ul>
</section>
<section class="article-section">
<h2>IPv6 — what changes from IPv4</h2>
<p>IPv6 fixes IPv4's address-exhaustion problem with 128-bit addresses. The mental model is similar but the notation and conventions differ:</p>
<div class="lang-block">
<div class="lang-block-header">ipv6</div>
<pre><code>Full form: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Compressed: 2001:db8:85a3::8a2e:370:7334
└ "::" replaces consecutive zeros (only once per address)
Loopback: ::1
Unspecified: ::
Link-local: fe80::/10 (auto-configured per-interface)
Unique local: fc00::/7 (private — IPv6 equivalent of RFC 1918)
Multicast: ff00::/8
Standard host subnet: /64 (always /64 for hosts; SLAAC requires it)
Standard site allocation: /48 to /56 from ISP</code></pre>
</div>
<h3>Common gotchas migrating from IPv4</h3>
<ul>
<li><strong>NAT is not used.</strong> IPv6 networks don't typically NAT — every device gets a globally routable address.</li>
<li><strong>Subnet sizes are huge.</strong> Even a tiny /64 subnet has 18 quintillion addresses. Don't think small.</li>
<li><strong>Both addresses on a /127 work.</strong> Like IPv4 /31, point-to-point links use /127 in modern practice (RFC 6164).</li>
<li><strong>Privacy extensions matter.</strong> Modern OSes use temporary addresses (privacy addresses) for outbound connections to prevent tracking via MAC-derived addresses.</li>
</ul>
</section>
<section class="article-section">
<h2>IP & subnet operations in 8 languages</h2>
<h3>JavaScript / Node.js</h3>
<div class="lang-block">
<div class="lang-block-header">javascript</div>
<pre><code>// Built-in net.isIP (Node.js)
import { isIP, isIPv4, isIPv6 } from 'node:net';
isIP('192.168.1.1'); // 4
isIP('::1'); // 6
isIP('not-an-ip'); // 0
// CIDR with the 'ip' package (npm i ip)
import ip from 'ip';
ip.cidrSubnet('192.168.0.1/24').firstAddress; // '192.168.0.1'
ip.toLong('192.168.0.1'); // 3232235521
ip.fromLong(3232235521); // '192.168.0.1'
</code></pre>
</div>
<h3>Python</h3>
<div class="lang-block">
<div class="lang-block-header">python</div>
<pre><code>from ipaddress import ip_address, ip_network, IPv4Network
# Parse + classify
addr = ip_address('192.168.1.1')
addr.is_private # True
addr.is_loopback # False
addr.version # 4
# Subnet math
net = ip_network('192.168.1.0/24')
net.network_address # IPv4Address('192.168.1.0')
net.broadcast_address # IPv4Address('192.168.1.255')
net.num_addresses # 256
list(net.hosts()) # [IPv4Address('192.168.1.1'), ..., IPv4Address('192.168.1.254')]
# IPv6 also works
ip_network('2001:db8::/32').num_addresses # huge number
</code></pre>
</div>
<h3>Go</h3>
<div class="lang-block">
<div class="lang-block-header">go</div>
<pre><code>import "net/netip"
// Modern netip package (Go 1.18+)
addr := netip.MustParseAddr("192.168.1.1")
addr.Is4() // true
addr.IsLoopback() // false
addr.IsPrivate() // true (Go 1.20+)
// Prefix / CIDR
prefix := netip.MustParsePrefix("192.168.0.0/24")
prefix.Contains(addr) // true
prefix.Bits() // 24
// Iterate over hosts
for a := prefix.Addr(); prefix.Contains(a); a = a.Next() {
fmt.Println(a)
}
</code></pre>
</div>
<h3>Rust</h3>
<div class="lang-block">
<div class="lang-block-header">rust</div>
<pre><code>use std::net::{IpAddr, Ipv4Addr};
use ipnet::Ipv4Net;
let addr: Ipv4Addr = "192.168.1.1".parse().unwrap();
addr.is_private(); // true
addr.is_loopback(); // false
let net: Ipv4Net = "192.168.0.0/24".parse().unwrap();
net.network(); // 192.168.0.0
net.broadcast(); // 192.168.0.255
net.contains(&addr); // true
</code></pre>
</div>
<h3>PHP</h3>
<div class="lang-block">
<div class="lang-block-header">php</div>
<pre><code>// Validation
filter_var('192.168.1.1', FILTER_VALIDATE_IP); // string or false
filter_var('::1', FILTER_VALIDATE_IP, FILTER_FLAG_IPV6); // ::1 or false
filter_var('192.168.1.1', FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE); // false (it's private)
// CIDR matching (manual)
function ipInCidr(string $ip, string $cidr): bool {
[$subnet, $bits] = explode('/', $cidr);
$ip = ip2long($ip);
$subnet = ip2long($subnet);
$mask = -1 << (32 - (int)$bits);
return ($ip & $mask) === ($subnet & $mask);
}
</code></pre>
</div>
<h3>Java</h3>
<div class="lang-block">
<div class="lang-block-header">java</div>
<pre><code>// Built-in InetAddress
import java.net.InetAddress;
InetAddress addr = InetAddress.getByName("192.168.1.1");
addr.isLoopbackAddress();
addr.isLinkLocalAddress();
addr.isSiteLocalAddress(); // RFC 1918 private
// CIDR — use Apache Commons Net's SubnetUtils
import org.apache.commons.net.util.SubnetUtils;
SubnetUtils utils = new SubnetUtils("192.168.1.0/24");
utils.getInfo().getNetworkAddress(); // "192.168.1.0"
utils.getInfo().getBroadcastAddress(); // "192.168.1.255"
utils.getInfo().isInRange("192.168.1.42"); // true
</code></pre>
</div>
<h3>Bash / shell</h3>
<div class="lang-block">
<div class="lang-block-header">bash</div>
<pre><code># Basic IPv4 validation
ip="192.168.1.1"
if [[ $ip =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then echo "valid"; fi
# subnet math via 'ipcalc' (install via apt/brew)
ipcalc 192.168.1.0/24
# Network: 192.168.1.0/24
# HostMin: 192.168.1.1
# HostMax: 192.168.1.254
# Broadcast: 192.168.1.255
# Modern alternative: 'sipcalc' or Python one-liner
python3 -c "from ipaddress import ip_network; n=ip_network('192.168.1.0/24'); print(n.broadcast_address)"
</code></pre>
</div>
<h3>SQL (PostgreSQL native types)</h3>
<div class="lang-block">
<div class="lang-block-header">postgresql</div>
<pre><code>-- Postgres has native inet and cidr types
SELECT '192.168.1.1'::inet; -- 192.168.1.1
SELECT '192.168.0.0/24'::cidr; -- 192.168.0.0/24
SELECT '192.168.1.42'::inet <<= '192.168.0.0/24'::cidr; -- true (contained)
SELECT host('192.168.0.5/24'::inet); -- '192.168.0.5'
SELECT broadcast('192.168.0.0/24'); -- 192.168.0.255
-- Indexed lookups for "what subnet does this IP belong to?"
CREATE INDEX idx_subnet ON subnets USING gist (cidr inet_ops);
</code></pre>
</div>
</section>
<section class="article-section">
<h2>Common IP/subnet mistakes</h2>
<ul>
<li><strong>Confusing /24 with 24 hosts.</strong> A <code>/24</code> has 256 addresses (254 usable). Higher CIDR number = smaller subnet, not larger.</li>
<li><strong>Forgetting RFC 1918 ranges aren't routable.</strong> Common cause of "works locally, fails in production" — your laptop on <code>10.x</code> can't be reached from the internet.</li>
<li><strong>Using 192.168.1.0/24 in cloud VPCs.</strong> Many home routers default to this range. If your laptop's home network and your AWS VPC overlap, your VPN is broken. Use <code>10.x</code> ranges in cloud, save 192.168 for home.</li>
<li><strong>Ignoring the network and broadcast addresses</strong> in /30 designs. A point-to-point link wants /31 (RFC 3021), not /30 — saves 2 addresses per link.</li>
<li><strong>IPv4-mapped IPv6 confusion.</strong> <code>::ffff:192.168.1.1</code> is the same address in IPv6 form. Some firewalls treat them differently.</li>
<li><strong>Forgetting CGNAT.</strong> Mobile and cable ISPs increasingly use <code>100.64.0.0/10</code> for customer addresses. If your IP is in this range, traditional IP-based geo-blocking and reputation systems may misclassify you.</li>
<li><strong>Subnet overlap in firewall rules.</strong> Allowing <code>10.0.0.0/8</code> when you meant <code>10.0.0.0/24</code> exposes 16 million extra addresses.</li>
</ul>
</section>
<section class="article-section">
<h2>Best subnet calculator and IP lookup tool for 2026 — what to compare</h2>
<p>"Subnet calculator" search results are a sea of ad-heavy 2003-era pages. The columns that actually matter when picking one in 2026:</p>
<table class="ref-table">
<thead>
<tr><th>Tool</th><th>IPv4</th><th>IPv6</th><th>Browser-only</th><th>Logs your IP</th><th>Notes</th></tr>
</thead>
<tbody>
<tr><td><strong>This tool (FreeDevTool)</strong></td><td><span class="yes">Yes</span></td><td><span class="yes">Yes</span></td><td><span class="yes">Yes</span></td><td><span class="no">No</span> — no API call on calculation</td><td>RFC 1918 / CGNAT / link-local detection</td></tr>
<tr><td><strong>subnetcalc.de</strong></td><td>Yes</td><td>Limited</td><td>Yes</td><td>No</td><td>Old UI, no IPv6 prefix decomposition</td></tr>
<tr><td><strong>iplocation.net / what-is-my-ip-address.com</strong></td><td>Lookup only</td><td>Yes</td><td>Server-side</td><td>Yes — every visit is geolocated and logged</td><td>Geolocation focus, not subnet math</td></tr>
<tr><td><strong>ipcalc CLI</strong> (<code>apt install ipcalc</code>)</td><td>Yes</td><td><span class="yes">Yes</span> (sipcalc fork)</td><td>Local CLI</td><td>Local</td><td>The classic. No IPv6 in some distros' default ipcalc.</td></tr>
<tr><td><strong>Cisco / Juniper IOS</strong> <code>show ip interface</code></td><td>Yes</td><td>Yes</td><td>On device</td><td>Audit log on device</td><td>Authoritative for actual configured interfaces, not for what-if math</td></tr>
</tbody>
</table>
<p>The single test that catches broken calculators: enter <code>10.0.0.5/30</code>. The correct output is network <code>10.0.0.4</code>, broadcast <code>10.0.0.7</code>, usable hosts <code>10.0.0.5–10.0.0.6</code> (2 hosts, not 4). Any tool returning hosts <code>10.0.0.4</code> or <code>10.0.0.7</code> is including the network/broadcast addresses incorrectly — walk away.</p>
<h3>How do I find the network address and broadcast for a CIDR block?</h3>
<p>Three steps, deterministic, work for every IPv4 prefix:</p>
<ol>
<li><strong>Convert the IP and the subnet mask to binary.</strong> For <code>192.168.1.137/26</code>, the address is <code>11000000.10101000.00000001.10001001</code> and the mask (26 leading 1s) is <code>11111111.11111111.11111111.11000000</code>.</li>
<li><strong>AND them bit-by-bit</strong> to get the network address. Result: <code>11000000.10101000.00000001.10000000</code> = <code>192.168.1.128</code>.</li>
<li><strong>OR the network with the inverted mask</strong> (the wildcard) to get the broadcast. Wildcard is <code>00000000.00000000.00000000.00111111</code>; OR gives <code>192.168.1.191</code>.</li>
</ol>
<p>Usable host range is <code>network + 1</code> through <code>broadcast - 1</code>: <code>192.168.1.129–192.168.1.190</code> (62 hosts). The calculator above shows all four values plus the binary breakdown; for a one-line scripted version, Python's <code>ipaddress.ip_network('192.168.1.137/26', strict=False)</code> returns the same.</p>
<h3>What's the difference between IP lookup, geolocation, and reverse DNS?</h3>
<p>Three different operations frequently confused:</p>
<ul>
<li><strong>IP lookup (this tool).</strong> Validates the address syntactically and classifies it (IPv4/IPv6, public/private, RFC 1918/CGNAT/link-local). No network call needed.</li>
<li><strong>IP geolocation.</strong> Maps an IP to an approximate physical location using a database (MaxMind, IP2Location). Accuracy is country-level usually, city-level sometimes. <em>Always</em> involves a server-side database query — never trust a "geolocation" tool that runs purely in the browser.</li>
<li><strong>Reverse DNS (PTR record).</strong> Looks up the hostname registered for an IP address in DNS. Use the <a href="/dns-lookup">DNS lookup tool</a> with type <code>PTR</code> for the proper query (<code>137.1.168.192.in-addr.arpa</code> for the example above).</li>
</ul>
<p>This tool covers the first only. For PTR/MX/CAA records on the resolved hostname use the <a href="/dns-lookup">DNS lookup tool</a>; for HTTP-level checks on the IP's services use the <a href="/http-status">HTTP status checker</a>.</p>
<h3>Subnet calculator alternative to subnet-calculator.com — why people switch</h3>
<p>The first-page Google results for "subnet calculator" are dominated by sites built between 2003 and 2010 — they work, but they ship with ads, no IPv6, no copy buttons, and poor mobile layout. Three reasons to prefer this page:</p>
<ol>
<li><strong>Full IPv6 support.</strong> Most legacy calculators stopped at IPv4. This page handles <code>2001:db8::/32</code>-style prefixes with the same UI.</li>
<li><strong>RFC 1918 / CGNAT / link-local awareness.</strong> Pasting <code>100.64.0.5</code> tells you immediately it's CGNAT (operator-assigned, not your home network) — most calculators just return network math without classification.</li>
<li><strong>No third-party scripts.</strong> Open the page, disconnect from the network, calculations still work. Ad-heavy alternatives 404 on the calculation when you block their tag managers.</li>
</ol>
<p>For workflows that combine subnet math with packet inspection or DNS resolution, pair this tool with the <a href="/dns-lookup">DNS lookup</a> and the <a href="/http-status">HTTP status checker</a>. Going the other direction — embedding an IPv4 inside a URL or query string for testing — pipe the result through the <a href="/url-encoder">URL encoder</a>.</p>
</section>
<section class="article-section">
<h2>IP address best practices for 2026</h2>
<ul>
<li><strong>Use modern CIDR notation</strong> (<code>192.168.1.0/24</code>) everywhere — it's clearer than separate IP + subnet mask.</li>
<li><strong>Plan IPv4 ranges with overlap-avoidance in mind.</strong> Don't use <code>192.168.1.0/24</code> in cloud VPCs (collides with home routers). Use <code>10.x.y.0/24</code> blocks.</li>
<li><strong>Document subnet allocations.</strong> Even a simple Google Sheet with "10.20.0.0/24 = production-eu-west" beats nothing. NetBox or Phpipam for serious environments.</li>
<li><strong>Reserve ranges for growth.</strong> Don't allocate <code>/24</code> if you'll need <code>/22</code> in two years. Re-numbering is painful.</li>
<li><strong>Use IPv6 when possible.</strong> All major cloud providers offer it. Modern apps should work with both.</li>
<li><strong>Validate IPs at API boundaries.</strong> Use your language's standard library (<code>ip_address</code> in Python, <code>netip</code> in Go, <code>InetAddress</code> in Java). Don't roll your own regex.</li>
<li><strong>Don't trust client-provided IPs alone.</strong> <code>X-Forwarded-For</code> headers are user-controlled until your edge proxy strips them. Always set them server-side at the LB/CDN.</li>
<li><strong>Use Postgres <code>inet</code>/<code>cidr</code> types</strong> instead of <code>VARCHAR</code> for storing IPs. Native types are smaller, indexable, and let you query subnet membership.</li>
</ul>
</section>
</article>
<!-- FAQ -->
<section class="faq-section">
<h2>Frequently Asked Questions</h2>
<div class="faq-item open">
<div class="faq-q" onclick="toggleFaq(this)">
How do I find information about an IP address?
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>
</div>
<div class="faq-a">
Enter any IPv4 or IPv6 address into the input field above to instantly see its version, binary/decimal/hex representations, classification (private, public, loopback, link-local, multicast), and IP class. Add a CIDR prefix length (e.g., <code>/24</code>) to calculate subnet details including <strong>network address</strong>, <strong>broadcast address</strong>, usable host range, <strong>subnet mask</strong>, and <strong>wildcard mask</strong>. All processing happens locally in your browser — no data is sent to any server, and no external API calls are made.
</div>
</div>
<div class="faq-item">
<div class="faq-q" onclick="toggleFaq(this)">
What is the difference between IPv4 and IPv6?
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>
</div>
<div class="faq-a">
<strong>IPv4</strong> uses 32-bit addresses written as four decimal octets (e.g., <code>192.168.1.1</code>), providing about 4.3 billion unique addresses. <strong>IPv6</strong> uses 128-bit addresses written as eight groups of four hexadecimal digits separated by colons (e.g., <code>2001:0db8::1</code>), providing approximately 3.4 × 10<sup>38</sup> addresses. IPv6 was created to solve IPv4 address exhaustion and includes improvements like built-in IPsec support, simplified packet headers, and elimination of NAT.
</div>
</div>
<div class="faq-item">
<div class="faq-q" onclick="toggleFaq(this)">
What are private IP address ranges (RFC 1918)?
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>
</div>
<div class="faq-a">
RFC 1918 defines three private IPv4 address ranges not routable on the public internet: <strong>10.0.0.0/8</strong> (~16.7 million addresses), <strong>172.16.0.0/12</strong> (~1 million addresses), and <strong>192.168.0.0/16</strong> (~65,000 addresses). These are used for local area networks behind NAT routers. Other reserved ranges include <code>127.0.0.0/8</code> for loopback and <code>169.254.0.0/16</code> for link-local auto-configuration. The reference table above lists all common reserved ranges.
</div>
</div>
<div class="faq-item">
<div class="faq-q" onclick="toggleFaq(this)">
How does CIDR notation and subnetting work?
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>
</div>
<div class="faq-a">
<strong>CIDR</strong> (Classless Inter-Domain Routing) notation appends a prefix length to an IP address, like <code>192.168.1.0/24</code>. The prefix length indicates how many leading bits define the network portion. A <code>/24</code> means 24 network bits and 8 host bits — giving 256 total addresses (254 usable hosts, minus network and broadcast). Subnetting divides a larger network into smaller segments: a <code>/24</code> can be split into two <code>/25</code> subnets (128 addresses each) or four <code>/26</code> subnets (64 addresses each). Use the subnet calculator above to explore these calculations interactively.
</div>
</div>
<div class="faq-item">
<div class="faq-q" onclick="toggleFaq(this)">
What is a subnet mask and how do I calculate it?
<svg class="chevron" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 12 15 18 9"/></svg>
</div>
<div class="faq-a">
A <strong>subnet mask</strong> is a 32-bit number that separates the network and host portions of an IP address. It consists of consecutive 1-bits for the network part followed by 0-bits for the host part. For example, <code>/24</code> = <code>255.255.255.0</code> (24 ones followed by 8 zeros in binary). The <strong>wildcard mask</strong> is the bitwise inverse: <code>0.0.0.255</code>. To find the network address, perform a bitwise AND between the IP and subnet mask. The broadcast address has all host bits set to 1. Enter any IP with a CIDR prefix above to see all these values computed instantly.
</div>
</div>
</section>
<!-- Related Tools -->
<section class="related-section">
<h2>Related Tools</h2>
<div class="related-grid">
<a class="related-card" href="hash-generator">
<div class="related-icon">#</div>
<div class="related-card-info">
<div class="related-card-name">Hash Generator</div>
<div class="related-card-desc">Generate MD5, SHA-256, SHA-512 hashes</div>
</div>
</a>
<a class="related-card" href="number-base">
<div class="related-icon">01</div>
<div class="related-card-info">
<div class="related-card-name">Number Base Converter</div>
<div class="related-card-desc">Convert between binary, hex, octal, decimal</div>
</div>
</a>
<a class="related-card" href="url-encoder">
<div class="related-icon">🔗</div>
<div class="related-card-info">
<div class="related-card-name">URL Encoder</div>
<div class="related-card-desc">Encode and decode URL components</div>
</div>
</a>
</div>
</section>
<section class="all-tools-section" aria-label="Browse all FreeDevTool developer tools">
<h2>Browse all 50 free developer tools</h2>
<p class="atc-sub">All tools run in your browser, no signup required, nothing sent to a server.</p>
<div class="all-tools-grid">
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">b64</div>
<div class="atc-cat-title"><h3>Encoding & Conversion</h3><span class="atc-cat-count">11 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/base64-encoder">Base64 Encoder / Decoder</a></li>
<li><a href="/base64-image">Image to Base64</a></li>
<li><a href="/byte-converter">Byte Converter (KB / MB / GB)</a></li>
<li><a href="/case-converter">Case Converter</a></li>
<li><a href="/hex-to-rgb">Hex to RGB / HSL</a></li>
<li><a href="/html-entity">HTML Entity Encoder</a></li>
<li><a href="/json-to-csv">JSON to CSV Converter</a></li>
<li><a href="/px-to-rem">PX to REM Converter</a></li>
<li><a href="/string-escape">String Escape / Unescape</a></li>
<li><a href="/url-encoder">URL Encoder / Decoder</a></li>
<li><a href="/yaml-to-json">YAML to JSON Converter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">{ }</div>
<div class="atc-cat-title"><h3>Formatting & Generators</h3><span class="atc-cat-count">13 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/color-name">Color Name from Hex</a></li>
<li><a href="/color-picker">Color Palette Picker</a></li>
<li><a href="/css-box-shadow">CSS Box Shadow</a></li>
<li><a href="/css-gradient">CSS Gradient Generator</a></li>
<li><a href="/json-formatter">JSON Formatter / Validator</a></li>
<li><a href="/lorem-ipsum">Lorem Ipsum Generator</a></li>
<li><a href="/markdown-preview">Markdown Preview</a></li>
<li><a href="/password-generator">Password Generator</a></li>
<li><a href="/qr-generator">QR Code Generator</a></li>
<li><a href="/sql-formatter">SQL Formatter</a></li>
<li><a href="/uuid-generator">UUID Generator</a></li>
<li><a href="/word-to-markdown">Word to Markdown</a></li>
<li><a href="/xml-formatter">XML Formatter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">JS</div>
<div class="atc-cat-title"><h3>Minifiers & DevOps</h3><span class="atc-cat-count">6 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/chmod-calculator">chmod Calculator</a></li>
<li><a href="/cron-parser">Cron Expression Parser</a></li>
<li><a href="/css-minifier">CSS Minifier</a></li>
<li><a href="/html-minifier">HTML Minifier</a></li>
<li><a href="/js-minifier">JavaScript Minifier</a></li>
<li><a href="/http-status">HTTP Status Codes</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">#</div>
<div class="atc-cat-title"><h3>Security & Hashing</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/hash-generator">Hash Generator (MD5, SHA)</a></li>
<li><a href="/jwt-decoder">JWT Decoder</a></li>
<li><a href="/jwt-generator">JWT Generator</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">.*</div>
<div class="atc-cat-title"><h3>Code & Text</h3><span class="atc-cat-count">8 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/ai-token-counter">AI Token Counter</a></li>
<li><a href="/char-counter">Character & Word Counter</a></li>
<li><a href="/git-cheatsheet">Git Commands Cheatsheet</a></li>
<li><a href="/number-base">Number Base Converter</a></li>
<li><a href="/regex-explainer">Regex Explainer</a></li>
<li><a href="/regex-tester">Regex Tester</a></li>
<li><a href="/text-diff">Text Diff Checker</a></li>
<li><a href="/wcag-contrast">WCAG Contrast Checker</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">IP</div>
<div class="atc-cat-title"><h3>Network & APIs</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/dns-lookup">DNS Lookup</a></li>
<li><a href="/http-request-builder">HTTP Request Builder</a></li>
<li><a href="/ip-lookup">IP Address Lookup</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">⏱</div>
<div class="atc-cat-title"><h3>Time & Dates</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/relative-time">Relative Time Calculator</a></li>
<li><a href="/timestamp-diff">Timestamp Diff</a></li>
<li><a href="/unix-timestamp-converter">Unix Timestamp Converter</a></li>
</ul>
</div>
<div class="atc-cat">
<div class="atc-cat-head">
<div class="atc-cat-icon">SEO</div>
<div class="atc-cat-title"><h3>SEO & Meta</h3><span class="atc-cat-count">3 tools</span></div>
</div>
<ul class="atc-list">
<li><a href="/meta-tag-generator">Meta Tag Generator</a></li>
<li><a href="/og-preview">Open Graph Preview</a></li>
<li><a href="/slug-generator">URL Slug Generator</a></li>
</ul>
</div>
</div>
</section>
</div>
<footer>
<div>© 2026 FreeDevTool — IP Lookup & Subnet Calculator</div>
<div class="footer-links">
<a href="/all-tools">All Tools</a>
<a href="/about">About</a>
<a href="/privacy">Privacy Policy</a>
<a href="/terms">Terms of Use</a>
</div>
</footer>
<script>
// ── Helpers ──
function showToast() {
const t = document.getElementById('copy-toast');
t.classList.add('show');
setTimeout(() => t.classList.remove('show'), 1800);
}
function copyText(text) {
navigator.clipboard.writeText(text);
showToast();
}
function toggleFaq(el) { el.parentElement.classList.toggle('open'); }
function loadExample(ip, cidr) {
document.getElementById('ip-input').value = ip;
document.getElementById('cidr-input').value = cidr;
analyze();
}
// ── IPv4 Parsing & Validation ──
function parseIPv4(str) {
str = str.trim();