Parse a URL string into its components, with proper encoding

Input Fields

  • url (required text): the url to parse

Output Fields

  • protocol (text): the URL’s protocol returned in lower case (e.g. http:)
  • host (text): the URL’s host property returned in lower case (e.g. www.test.com)
  • port (number): the port specified in the URL returned as a number; if no port is specified, a null value is returned
  • path (text): the entire path of the URL; this is everything following the host (including the port) and before the query portion of the URL
  • query (text): the entire query string portion of the URL

Example

For the input url: http://www.test.com:8080/test url?value=example&value2=URL

You’d get the following outputs:

  • protocol: http:
  • host: www.test.com
  • port: 8080
  • path: /test%20url
  • query: value=example&value2=URL