A valid IPv4 address has four numbers separated by dots, each between 0 and 255
An IPv4 address is valid when it follows one specific format: four numbers (called octets) separated by periods, with each number ranging from 0 to 255. That's it. If you see something that breaks this pattern, it's not a valid IPv4 address.
The address 192.168.1.1 is valid. The address 192.168.1.256 is not, because 256 exceeds 255. The address 192.168.1 is not, because it only has three numbers. The address 192.168.1.1.1 is not, because it has five. Learning to spot the difference matters because an invalid address won't connect you to anything — your device will reject it before it even tries.
Key Takeaways
- A valid IPv4 address contains exactly four numbers separated by dots, with each number between 0 and 255.
- Common invalid examples include addresses with numbers over 255, too few or too many sections, letters or symbols in the wrong places, or leading zeros in some contexts.
- Your router's address (often 192.168.1.1 or 192.168.0.1) and your computer's local address follow the same four-number rule.
- If you type an invalid address into your browser or network settings, your device will either reject it outright or fail to connect.
The four-number rule and the 0-to-255 limit
Every valid IPv4 address breaks down into four sections. Each section is a number from 0 to 255. Write them with a dot between each one, and you have a valid address. Write anything else, and you don't.
The reason for the 0-to-255 limit is technical: each section represents 8 bits of data, and 8 bits can hold values from 0 to 255. You don't need to understand why — you just need to know that 256 and above are out of bounds. The same applies to negative numbers. An address like 192.168.-1.1 is invalid because -1 falls outside the allowed range.
Spaces, letters, and symbols don't belong in an IPv4 address except for the dots themselves. An address like 192.168.1.a or 192.168.1.1! will not work. Your device expects only numbers and dots.
Common mistakes that make an address invalid
The most frequent error is a number that exceeds 255. Someone might type 192.168.1.300 thinking it looks reasonable, but 300 is too large. The address fails immediately.
The second common mistake is the wrong number of sections. An address with only three numbers (192.168.1) or five numbers (192.168.1.1.1) is invalid. Your device needs exactly four.
Leading zeros can cause problems in some contexts. An address like 192.168.001.001 may be rejected by certain systems because they interpret the leading zero as an octal (base-8) number rather than decimal. Most modern systems handle this correctly, but it's safer to avoid leading zeros altogether.
Spaces between numbers also break the format. An address typed as "192. 168. 1. 1" with spaces will not work. The format must be tight: four numbers, three dots, nothing else.
Examples of valid and invalid addresses
| Address | Valid or Invalid | Why |
|---|---|---|
| 192.168.1.1 | Valid | Four numbers, all between 0 and 255, separated by dots. |
| 10.0.0.1 | Valid | Four numbers, all between 0 and 255, separated by dots. |
| 172.16.0.1 | Valid | Four numbers, all between 0 and 255, separated by dots. |
| 255.255.255.255 | Valid | Four numbers, all between 0 and 255, separated by dots. |
| 0.0.0.0 | Valid | Four numbers, all between 0 and 255, separated by dots. |
| 192.168.1.256 | Invalid | The last number (256) exceeds 255. |
| 192.168.1 | Invalid | Only three numbers instead of four. |
| 192.168.1.1.1 | Invalid | Five numbers instead of four. |
| 192.168.1.a | Invalid | Contains a letter; only numbers are allowed. |
| 192.168.1.1! | Invalid | Contains a symbol; only numbers and dots are allowed. |
| 192 168 1 1 | Invalid | Spaces instead of dots as separators. |
| 192.168.-1.1 | Invalid | Contains a negative number; all numbers must be 0 or higher. |
Where you'll encounter IPv4 addresses and why the format matters
You'll see IPv4 addresses in several places: your router's settings page (usually 192.168.1.1 or 192.168.0.1), your computer's network settings, your internet service provider's documentation, and sometimes in error messages when something goes wrong with your connection.
If you type an invalid address into your browser's address bar, your device will treat it as a search term rather than an address. If you type an invalid address into your network settings, the system will either reject it with an error message or fail silently when you try to connect. Either way, nothing will work until you correct it.
Understanding the format helps you troubleshoot quickly. If someone tells you to visit 192.168.1.1 and you see an error, you can check whether you typed it correctly before assuming something else is broken.
Private versus public IPv4 addresses follow the same format rules
Private addresses (like 192.168.1.1 or 10.0.0.1) and public addresses (the ones your internet service provider assigns to your home or business) both follow the same four-number, 0-to-255 format. The difference is which ranges are reserved for private use and which are available on the public internet, but the validation rule is identical.
A private address is still invalid if it has a number over 255 or the wrong number of sections. A public address is still invalid if it breaks the format. The format itself doesn't change based on whether the address is private or public.
Frequently Asked Questions
Can an IPv4 address start with 0?
Yes. An address like 0.0.0.1 is valid because each number is between 0 and 255. However, 0.0.0.0 is a special reserved address used for default routes, so you won't see it assigned to a device under normal circumstances.
What if I see an IPv4 address with more than four numbers?
It's not a valid IPv4 address. You may be looking at an IPv6 address (which uses a different format with colons and hexadecimal characters) or a malformed entry. IPv4 requires exactly four numbers.
Does the order of numbers matter?
Yes. An address is valid only if it follows the four-number format in sequence. Rearranging the numbers creates a different address, and if any number exceeds 255, the whole thing is invalid regardless of order.
What happens if I type an invalid IPv4 address into my router settings?
Your router will either display an error message and refuse to save the entry, or it will save the entry but fail to connect when you try to use it. Either way, you'll need to correct the address before your device can communicate on the network.
Is 192.168.1.01 valid?
Technically it represents the number 1, but the leading zero can cause problems in some systems that interpret it as octal notation. It's safer to type 192.168.1.1 without the leading zero to avoid confusion.