Port Number Validator
Check whether text is a valid port number as you type it, right in your browser, without sending it anywhere.
Input
Output
No value
Guide
What is a port number?
A port number tells a computer which program should receive a network connection. One server can run a website, email and remote logins at once because each program listens on a port of its own: browsers connect to port 443 for HTTPS and 80 for plain HTTP, and SSH uses 22. Ports belong to the TCP and UDP protocols and are whole numbers from 0 to 65535. IANA, which keeps the official list, splits them into well-known ports (0 to 1023) for standard services, registered ports (1024 to 49151) that it assigns to applications, such as 5432 for PostgreSQL, and dynamic ports (49152 to 65535) for temporary and private use.
You check a port when you set up port forwarding on a router, edit a server or game config, write a firewall rule, or build a form that asks for the port of a mail server or database.
Tool description
Type or paste a number into the Port number field, and the result shows as you type: "Port number is valid" or "Port number is not valid". Spaces and line breaks around a pasted number are ignored. There are no settings: every port from 0 to 65535 passes, whatever its range.
What passes and what fails
- Whole numbers from 0 to 65535 written with the digits 0 to 9 pass:
22,443,8080,65535 0passes too. It's reserved, but programs ask for port 0 when they want the system to pick a free port for them.- Numbers above 65535, such as
65536, fail, and so do negative numbers - Leading zeros fail:
080 - Decimals, hexadecimal numbers and exponents fail:
80.0,0x50,1e3 - Anything else around the number fails: a colon (
:443), a protocol (443/tcp), a range (8000-8080) or a list (80,443) - Digits of other scripts, such as Arabic-Indic or full-width digits, fail
Good to know
- A plus sign in front passes, so
+80is valid, and so is-0. Remove the sign before you save a port somewhere that expects digits only. - The check can't tell whether a port is open or already taken by another program.
- To pick a free port for a new service, use the Random port generator. To check a host name and port together, such as
example.com:8080, use the URL Validator.
Features
- Checks TCP and UDP port numbers from 0 to 65535
- Rejects leading zeros, decimals and ranges
- Nothing to set: just type the number
- Results as you type, with no button to press
- Runs in your browser, so nothing you type is sent anywhere