URL Validator
Full URL with query
Not a URL
FTP URL
Validate URL format and structure. Check protocol, hostname, path, query parameters, and fragment. Supports HTTP, HTTPS, FTP, and more.
How to Use URL Validator
- Enter a URL in the input field.
- Click "Validate" or press Enter.
- If the URL is valid, see its parsed components (protocol, hostname, path, etc.).
- If invalid, an error message explains why the URL could not be parsed.
What is URL Validation?
URL validation checks whether a string is a well-formed Uniform Resource Locator according to the WHATWG URL Standard. A valid URL follows the structure protocol://hostname:port/path?query=value#fragment, where the protocol defines how to connect (HTTP, HTTPS, FTP), the hostname identifies the server, the port specifies the network endpoint, the path points to a resource, query parameters pass data, and the fragment references a section within the page. This tool uses the browser's built-in URL constructor for standards-compliant validation and parsing.
How URL Validation Works
The validator attempts to construct a URL object from your input. If the constructor succeeds, the URL is valid, and the tool displays all parsed components including the protocol, hostname, port, pathname, search parameters, and hash fragment. If the constructor throws an error, the URL is invalid, and an error message explains why it could not be parsed. The browser's URL parser handles edge cases like resolving relative paths, normalizing default ports, encoding special characters, and validating hostname structure. This approach ensures the same validation behavior as web browsers when processing URLs.
Common Use Cases
- Verifying API endpoint URLs before making requests
- Checking redirect URLs and callback URLs in OAuth flows
- Validating user-submitted URLs in forms and admin panels
- Debugging webhook URLs and configuration endpoints
- Testing URL construction logic in web applications
- Confirming link format before embedding in emails or documents
Common URL Validation Issues
The most frequent reason a URL fails validation is a missing protocol. Strings like example.com are not valid URLs because the browser cannot determine the connection method. The protocol (such as https://) must be included. Other common issues include spaces in the URL (which must be encoded as %20), unmatched brackets, invalid port numbers (ports must be between 0 and 65535), and hostnames containing characters that are not allowed in domain names. International domain names (IDN) with non-ASCII characters are valid when properly encoded using Punycode. Note that this tool only validates format and structure; it does not check whether the server is reachable or the page exists.
For parsing URLs into their individual components, use the URL Parser. For encoding special characters in URLs, try the URL Encoder/Decoder. For HTTP status code reference, see the HTTP Status Codes.