Validator

Validator

URL validator online. Check if a URL is valid and see protocol, domain, port, and path breakdown. Validate URLs instantly—free browser tool.

0 chars

URL to Validate

Supported Protocols

http://https://ftp://mailto://tel://file://

Features

  • Validate URL syntax and format
  • Check protocol, domain, port, path
  • Detect invalid characters
  • Show URL component breakdown
  • Real-time validation as you type
  • Detailed error messages

Common Use Cases

  • Verify user-submitted URLs
  • Debug malformed URLs
  • Validate API endpoint URLs
  • Check URL format before requests
  • Test URL parser implementations

URL Validation Rules

URL validation checks if a URL follows the correct syntax and format. Valid URLs must have a proper protocol, domain, and optional path/query/fragment components.

Valid URL components:

  • Protocol - http://, https://, ftp://, etc.
  • Domain - example.com, sub.example.co.uk
  • Port - Optional :8080, :3000 (must be 1-65535)
  • Path - /api/users, /page.html
  • Query - ?key=value&foo=bar
  • Fragment - #section

Common errors:

  • Missing protocol (should be https://, not example.com)
  • Invalid characters (spaces, non-ASCII without encoding)
  • Malformed port (not a number or out of range)
  • Incomplete domain (missing TLD or dots)

Note: A valid URL format doesn't mean the URL exists or is accessible—it just means the syntax is correct.

Examples

Valid - Valid HTTPS URL
https://www.example.com/path?query=value#hash
✓ Valid - correct protocol, domain, path, query, fragment
Invalid - Invalid - missing protocol
www.example.com/page
✗ Invalid - must start with http:// or https://
Valid - Valid - with port
https://localhost:3000/api
✓ Valid - port number is valid

Frequently Asked Questions

What makes a URL valid?

A valid URL must have: (1) a protocol (http://, https://), (2) a domain (example.com), and (3) proper encoding of special characters. Path, query, and fragment are optional. The port (if present) must be 1-65535.

Why does "example.com" fail validation?

URLs require a protocol like http:// or https://. "example.com" is a domain name, not a complete URL. The valid version is https://example.com.

Can URLs contain spaces?

No. Spaces must be URL-encoded as %20 or +. A URL with unencoded spaces is invalid. Use our URL Encoder to fix URLs with spaces.

Are localhost and IP addresses valid URLs?

Yes! https://localhost:3000 and http://192.168.1.1 are valid URLs. IPv6 addresses must be in brackets: http://[::1]:8080.

Does validation check if the URL exists?

No. Validation only checks syntax, not existence. A URL can be perfectly valid but point to a non-existent page or domain. To check existence, you need to make an HTTP request.