What does the Port & Protocol Lookup do?
The Port & Protocol Lookup Tool searches TCP and UDP network ports, standard service names, transport layer protocols, and official IANA (Internet Assigned Numbers Authority) registrations. It supports searching by single port numbers, comma-separated port lists, numerical ranges (such as 20-25), and service keywords (such as redis, postgres, ssh, or http).
Core Concepts
Understanding network port ranges helps when designing firewall rules and auditing open sockets:
- Well-Known Ports (0–1023): Reserved for privileged system services such as HTTP (80), HTTPS (443), SSH (22), DNS (53), and SMTP (25).
- Registered Ports (1024–49151): Assigned by IANA for specific vendor services and software applications, including MySQL (3306), PostgreSQL (5432), Redis (6379), and Kafka (9092).
- Dynamic / Private Ports (49152–65535): Ephemeral ports dynamically assigned by client operating systems for outbound network socket sessions.
How to use the tool?
- Enter Search Query: Type any port number (e.g.
443), multiple ports (80, 443, 3306), port range (8000-8088), or service keyword (redis,docker) into the search input. - Execute Lookup: The tool queries the port database and returns matching service records.
- Inspect Service Details: Review transport protocols (TCP/UDP), official IANA registration statuses, service categories, and descriptions.
Related Developer Utilities
If you are configuring cloud VPCs, firewalls, or network subnets, explore these complementary tools:
- CIDR Subnet Calculator: Calculate IPv4 network ranges, subnet masks, and broadcast boundaries.
- Subnet Mask Converter: Convert between standard subnet masks, Cisco wildcard masks, and CIDR prefixes.
- IP Range to CIDR Calculator: Convert arbitrary start and end IP address ranges into optimal CIDR blocks.
- AWS Security Group IP Ranges: Search official AWS IP address prefixes to generate inbound security group rules.
REST API Integration
Blueutils provides a free REST API endpoint (POST https://blueutils.com/api/network/port-lookup) to programmatically lookup TCP/UDP network ports, service names, and protocol specifications.
API Request Parameters
| Name | Type | Description | Example |
|---|---|---|---|
rawText |
String | Port number, comma-separated list, range (20-25), or keyword. |
"80, 443, 3306" |
API Request Payload Examples
cURL
curl -X POST https://blueutils.com/api/network/port-lookup \
-H "Content-Type: application/json" \
-d '{
"rawText": "80, 443, 3306"
}'Python
import requests
url = "https://blueutils.com/api/network/port-lookup"
payload = { "rawText": "80, 443, 3306" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String jsonPayload = """
{
"rawText": "80, 443, 3306"
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://blueutils.com/api/network/port-lookup"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}API Response Parameters
| Name | Type | Description | Example |
|---|---|---|---|
isValid |
Boolean | Indicates whether the lookup succeeded. | true |
query |
String | Echoes the input search query. | "80, 443, 3306" |
searchType |
String | Classification of search performed (numeric-list, range, keyword). |
"numeric-list" |
totalMatches |
Integer | Total number of matching port database records. | 3 |
ports |
Array | Matching port objects containing protocol, service name, category, and status. | [...] |
API Response Payload Examples
Success Response (HTTP 200 OK)
{
"isValid": true,
"query": "80, 443, 3306",
"searchType": "numeric-list",
"totalMatches": 3,
"ports": [
{
"port": 80,
"protocol": "TCP",
"service": "HTTP",
"description": "Hypertext Transfer Protocol - Unencrypted Web Traffic",
"category": "Well-Known (0-1023)",
"status": "Official IANA"
},
{
"port": 443,
"protocol": "TCP",
"service": "HTTPS",
"description": "Hypertext Transfer Protocol Secure (TLS/SSL Web)",
"category": "Well-Known (0-1023)",
"status": "Official IANA"
},
{
"port": 3306,
"protocol": "TCP",
"service": "MySQL / MariaDB",
"description": "MySQL & MariaDB Database Server",
"category": "Registered (1024-49151)",
"status": "Official IANA"
}
]
}Validation Failure Response (HTTP 400 Bad Request)
{
"isValid": false,
"error": "Invalid port number: 70000. Port numbers must be integers between 0 and 65535."
}Rate Limit Exceeded Response (HTTP 429 Too Many Requests)
{
"error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}Why use an API to lookup network ports?
Integrating the Port Lookup API into vulnerability scanners, security auditing scripts, or CI/CD pipelines provides several advantages:
- Rapid Script Validation: Enables security teams and automated scanners to quickly map open ports discovered via
nmapornetstatto standard services and IANA assignments. - Optimized Token Efficiency for AI Agents: Offloads port number to service translation to an external API without consuming token budget querying LLM knowledge bases.
- Deterministic Accuracy Without Hallucinations: Ensures accurate port numbers and transport protocol mappings (TCP vs UDP) without risk of incorrect port assumptions.
Native Usage
How to query port and service definitions locally using operating system service databases:
Windows (CMD / PowerShell)
# Search Windows native services database file
Get-Content "$env:SystemRoot\system32\drivers\etc\services" | Select-String -Pattern "80/tcp|443/tcp|3306/tcp|redis"Linux / Unix (Bash)
# Query the Linux /etc/services database
grep -E "(80|443|3306)/tcp" /etc/services
# Query by service keyword
grep -i "mysql" /etc/servicesPython
Using Python standard library socket to query service names by port:
import socket
ports = [22, 80, 443, 3306]
for port in ports:
try:
service_tcp = socket.getservbyport(port, "tcp")
print(f"Port {port}/TCP -> {service_tcp}")
except OSError:
print(f"Port {port}/TCP -> Unassigned / Unknown")Java
Using Java to lookup standard port numbers via resource mapping:
import java.net.URI;
import java.util.Map;
public class PortLookupExample {
private static final Map<Integer, String> WELL_KNOWN_PORTS = Map.of(
22, "SSH",
80, "HTTP",
443, "HTTPS",
3306, "MySQL",
5432, "PostgreSQL",
6379, "Redis"
);
public static void main(String[] args) {
int[] queryPorts = {80, 443, 6379, 9999};
for (int p : queryPorts) {
String service = WELL_KNOWN_PORTS.getOrDefault(p, "Custom / Unregistered");
System.out.println("Port " + p + ": " + service);
}
}
}