URL Validator

Enter one URL per line to parse and validate. Shows protocol, hostname, path, query params, and more.

Enter URLs above to validate and parse them

URL structure: understanding the anatomy of a web address

A URL is composed of distinct parts, each with its own syntax rules. The scheme (https://) identifies the protocol. The authority (//) introduces the host: usually a domain name or IP address, optionally followed by a colon and port number. The path (/products/shoes) identifies the specific resource. The query string (?color=red&size=42) passes parameters. The fragment (#details) addresses a sub-section on the client side.

Malformed URLs are a common source of bugs in web applications. A URL with an unencoded space, a missing scheme, or an invalid hostname will silently fail in some contexts and throw in others. Validating URLs at the point of input: in form validation, link checking, or API parameter parsing: prevents these failures from reaching production. This tool uses the browser's native URL parser (the same one used by fetch and XMLHttpRequest) to give you the definitive answer.

How to validate a URL: step by step

  1. 1
    Enter a URL
    Type or paste any URL into the input field. Include the protocol (https://): a URL without a scheme is technically invalid and the validator will explain why.
  2. 2
    Check the validity indicator
    A green valid or red invalid badge appears immediately. Invalid URLs show a reason explaining what is wrong: missing scheme, invalid hostname, illegal characters in the path, etc.
  3. 3
    Review the parsed components
    The breakdown panel shows each URL component separately: protocol, hostname, port (if present), pathname, search query string, and hash fragment. This is exactly how the URL API in browsers parses it.
  4. 4
    Check individual query parameters
    If the URL has a query string, the parameters are decoded and listed individually as key/value pairs. Percent-encoded characters are shown in their decoded form.
  5. 5
    Identify common mistakes
    The validator catches common URL mistakes: double slashes in the path, unencoded spaces, missing TLD in hostnames, and protocol typos like htps:// or www without a scheme.

Related Tools

Frequently Asked Questions

What makes a URL valid?
A valid URL must have a scheme (protocol) such as https://, an authority (hostname), and optionally a path, query string, and fragment. The hostname must be a valid domain or IP address. Characters not allowed in specific URL components must be percent-encoded.
Is www.example.com a valid URL?
No. www.example.com without a scheme (https:// or http://) is not a valid URL: it is a hostname. A valid URL would be https://www.example.com. Many validators accept hostnames as 'valid enough' but the URL specification requires a scheme.
What is a query string?
The query string is the part of the URL after the ? character. It contains key=value pairs separated by & characters: for example ?page=2&sort=date. Query strings pass parameters to the server or client-side router.
What is a URL fragment?
The fragment is the part after the # character: for example #section-3. Fragments are not sent to the server; they are handled by the browser to scroll to an element or by JavaScript-based routers for client-side navigation.
What characters must be percent-encoded in a URL?
Spaces must be encoded as %20 (or + in query strings). Reserved characters like #, ?, &, =, /, and @ must be encoded when they appear in parts where they have no structural meaning. Unicode characters must also be percent-encoded in their UTF-8 byte representation.
What is the difference between URI and URL?
A URI (Uniform Resource Identifier) identifies a resource. A URL (Uniform Resource Locator) is a URI that also specifies how to locate the resource (via a scheme like https). All URLs are URIs, but not all URIs are URLs (for example, URNs like isbn: are URIs but not URLs).
Can I validate relative URLs?
Relative URLs (like /path/to/page or ../image.png) do not have a scheme or host, so they cannot be validated as absolute URLs. The validator checks for absolute URLs. Relative URL validation requires knowing the base URL context.
Is this tool free?
Completely free. All validation runs in your browser: no data is sent to any server.

AlteredIdea vs alternatives

vs other online tools: Everything runs in your browser: private, instant, no account needed.

vs desktop apps: No install required. Works on any device.

vs paid tools: Completely free, unlimited use.