Skip to main content

urlencode Search Operator

The urlencode operator encodes the URL into an ASCII character set. This is the standard format in which URLs can be sent over the internet.

For example, if your URL looks like this:

http://yourmainserver-city55555.org/functions/main.php?gk=Gk45MgHJhEYx8bPYvGfiWS7o3KLdfg90&

It will be encoded to:

http%3A%2F%2Fyourmainserver-city55555.org%2Ffunctions%2Fmain.php%3Fgk%3DGk45MgHJhEYx8bPYvGfiWS7o3KLdfg90%26

Syntax

urlencode(<url_field>) [as <field>]

urlencode("<url string>") as <field>

Examples

Encode URLs from PagerDuty logs

To encode a URL in your PagerDuty logs, you can run this query:

=pagerduty
| kv "html_url" as url
| urlencode(url) as url

The query returns the field url encoded:

URL encode

Encode a literal URL string

To encode a known URL string directly in a query:

| urlencode("http://example.com/path?query=hello world") as encoded_url
Status
Legal
Privacy Statement
Terms of Use
CA Privacy Notice

Copyright © 2026 by Sumo Logic, Inc.