URL Search

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

Description

A URL query carries application-defined parameters after a question mark.

A URL query carries application-defined parameters after a question mark. Reading the serialized query preserves its structure rather than choosing values for repeated keys.1

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

When to use URL Search

Use this tool to extract the search of an absolute URL using the WHATWG URL parser, including its normalization rules.

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 Search 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 search. 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
urlAbsolute URL to parse.string; maximum length: 1000000Required

Paste an absolute URL. Return the normalized serialized search including its leading question mark when nonempty. No query and an empty query both yield an empty search string. Fragment content is excluded and percent encoding is retained.

search=WHATWG_URL(url).search

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

Output fieldMeaningValue type
searchNormalized URL search.string; maximum length: 1000000
json
{
  "input": {
    "url": "https://reader:secret@EXAMPLE.com:8443/a/../guide?q=one&q=two#part"
  },
  "output": {
    "search": "?q=one&q=two"
  }
}

Limitations and assumptions

The tool does not interpret parameter meanings or decode individual values. Relative or malformed URLs are input errors; no endpoint request is made.

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.

Alternative or Complementary methods

Use URL Query Count: Count parsed query parameters in an absolute URL, including repeated names and empty values. For a complementary task, use Cache Bust Query Adder: Set one named cache-busting query parameter on an absolute URL while preserving other parameters and its fragment.

References

  1. URL Search — tool.io

Similar or alternative tools

  • URL Query Count

    Count parsed query parameters in an absolute URL, including repeated names and empty values.

  • Cache Bust Query Adder

    Set one named cache-busting query parameter on an absolute URL while preserving other parameters and its fragment.

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