To the Top

IPv4 Calculator with API

Buy Me A Coffee

This page implements a Javascript Ajax calls the API to compute an IPv4 Netmask/broadcast/etc

ipcalc takes an IPv4 address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask, and host range. By giving a second netmask, you can design sub- and supernetworks. It is also intended to be a teaching tool and presents the results as easy-to-understand binary values.

Address:   127.0.0.1            01111111.00000000.00000000. 00000001
Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000
Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111
=>
Network:   127.0.0.0/24         01111111.00000000.00000000. 00000000
HostMin:   127.0.0.1            01111111.00000000.00000000. 00000001
HostMax:   127.0.0.254          01111111.00000000.00000000. 11111110
Broadcast: 127.0.0.255          01111111.00000000.00000000. 11111111
Hosts/Net: 254                   Class A, Loopback

API (Application Programming Interface)

The API following has a rate-limit 1 call per second.
https://uploadbeta.com/api/ipcalc/?cached&s=127.0.0.1
It will return JSON-encoded data:
"Address:   127.0.0.1            01111111.00000000.00000000. 00000001\nNetmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000\nWildcard:  0.0.0.255            00000000.00000000.00000000. 11111111\n=>\nNetwork:   127.0.0.0\/24         01111111.00000000.00000000. 00000000\nHostMin:   127.0.0.1            01111111.00000000.00000000. 00000001\nHostMax:   127.0.0.254          01111111.00000000.00000000. 11111110\nBroadcast: 127.0.0.255          01111111.00000000.00000000. 11111111\nHosts\/Net: 254                   Class A, Loopback\n\n"
If $_GET parameter s is not specified, this API will use the $_POST variable s instead.
curl -X POST https://helloacm.com/api/ipcalc/ -d "s=192.168.0.1"

Share: List of Many Other Online Tools