0 characters
0 characters

How to Use

1
Paste your text. Enter a raw string to encode (such as a query parameter value) or a percent-encoded string to decode.
2
Choose Encode or Decode. Click Encode to convert special characters to percent-encoded format (%20, %26, etc.). Click Decode to convert a percent-encoded string back to readable text.
3
Copy the result. Click Copy Output to copy the encoded or decoded string to your clipboard.

URL Encoding Examples

Input: Hello World & welcome=true Encoded: Hello%20World%20%26%20welcome%3Dtrue Input: https://example.com/search?q=hello world Encoded: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world Common encodings: Space = %20 & = %26 = = %3D / = %2F ? = %3F # = %23 + = %2B @ = %40 : = %3A

URL encoding ensures that special characters in query parameters are transmitted correctly. Characters like spaces, ampersands, and equals signs have special meanings in URLs — they delimit parameters and values. When these characters appear inside a parameter value, they must be encoded so the browser and server can parse the URL correctly. This tool uses encodeURIComponent, which is the correct function for encoding individual parameter values rather than full URLs.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent encoding) converts characters that are not allowed or have special meaning in URLs into a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures URLs can be transmitted correctly across the internet.

When should I URL encode a string?

Encode values when building query strings or URL parameters. If a parameter value contains spaces, ampersands, equals signs, or other special characters, those must be encoded first. Most programming languages provide built-in functions: encodeURIComponent() in JavaScript, urllib.parse.quote() in Python, urlencode() in PHP.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a full URL and leaves characters like / : # ? & = intact because they form valid URL structure. encodeURIComponent encodes a parameter value and also encodes those structural characters, because inside a value they would break the URL. This tool uses encodeURIComponent, which is correct for encoding parameter values.

What does %20 mean in a URL?

%20 is the percent-encoded representation of a space character. The space character (ASCII code 32, hexadecimal 20) is not allowed in URLs directly, so it is encoded as %20. You may also see a + used to represent a space in query strings, which is an older convention from HTML form encoding.

Is my data sent to a server?

No. All encoding and decoding uses the browser's built-in JavaScript functions. Your text is never uploaded, stored, or sent to any server.

Get fresh reads straight to your inbox

Get notified when we publish new articles. Unsubscribe anytime.