URL Is Absolute

Check whether a reference parses as an absolute WHATWG URL.

Description

An absolute URL is parseable without a base.

An absolute URL is parseable without a base. This includes schemes beyond HTTP(S), so absolute classification is broader than identifying a usable website address.1

Check whether a reference parses as an absolute WHATWG URL.

When to use URL Is Absolute

Use this tool to check whether a reference parses as an absolute WHATWG URL.

Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.

How to use URL Is Absolute and understand its results

  1. Choose the URL, decoded source text, header value or explicit byte list requested by this tool. Paste the complete relevant input and follow its parsing and encoding conventions.
  2. Enter url using the field table and calculation rules, then run the tool.
  3. Read result. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
urlURL reference to classify.string; maximum length: 1000000Required

Paste a URL reference. The tool attempts parsing without a base and returns true on success or false on a TypeError. Relative paths therefore return false; a well-formed opaque URL such as mailto can return true.

result=WHATWG constructor succeeds without a base

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
resultWhether the reference matches this URL class.boolean
json
{
  "input": {
    "url": "../assets/icon.svg"
  },
  "output": {
    "result": false
  }
}

Limitations and assumptions

This does not enforce an HTTP(S) allowlist or validate reachability, DNS, certificates or application support. A false classification is a successful result rather than malformed tool input.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors. A successfully returned false flag is an evaluated outcome; its meaning is explained above.

Alternative or Complementary methods

Use URL Is Relative: Check whether a reference needs a base URL and resolves against a hierarchical HTTPS base. For a complementary task, use URL Protocol: Extract the protocol of an absolute URL using the WHATWG URL parser, including its normalization rules.

References

  1. URL Is Absolute — tool.io

Similar or alternative tools

  • URL Is Relative

    Check whether a reference needs a base URL and resolves against a hierarchical HTTPS base.

  • URL Protocol

    Extract the protocol of an absolute URL using the WHATWG URL parser, including its normalization rules.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies