URL Encoder / Decoder
Encode or decode URL text online using percent encoding.
Result
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world
Encode and decode URLs online
URL encoding, also called percent encoding, converts characters into a format that can safely appear in URLs. It is especially useful when working with query parameters, web addresses and application data.
How to use the URL encoder and decoder
- Choose whether you want to encode or decode text.
- Enter or paste the URL component or text.
- Run the conversion to get the result.
- Copy the converted value for your application or URL.
URL encoding examples
Space → %20
& → %26
? → %3F
= → %3D
Hello world → Hello%20world
What is percent encoding?
Percent encoding represents a character using a percent sign followed by two hexadecimal digits for each encoded byte. For example, a space becomes %20 and an ampersand becomes %26. Non-ASCII text is first represented as UTF-8 bytes and then percent-encoded.
Why encode URL query parameters?
Characters such as ampersands and equals signs have special meanings in query strings. Encoding them inside a parameter value prevents them from being interpreted as separators in the URL.
For example, the value products & servicescan be encoded as products%20%26%20services before being included as a query parameter.
When should you use URL encoding?
- Preparing search terms for URL query parameters.
- Handling spaces and special characters in web addresses.
- Working with API requests and query strings.
- Passing Unicode text through URL-based applications.
- Decoding percent-encoded values received from a URL.
Is URL encoding the same as encryption?
No. URL encoding changes how text is represented; it does not protect or hide information. Anyone can decode a percent-encoded value. Do not use URL encoding to protect passwords, tokens or confidential data.
URL encoding and spaces
A space is commonly represented as %20 in URL components. Form submissions using application/x-www-form-urlencoded commonly represent spaces as a plus sign (+). These formats have different rules, so use the encoding expected by the destination.
Frequently asked questions
- Why do spaces turn into %20?
- URLs can't contain literal spaces, so they're percent-encoded as %20 (or sometimes +) to stay valid.
- What characters get encoded?
- Reserved and non-ASCII characters — spaces, ampersands, question marks, and similar — are converted to their percent-encoded form.