URL Encoder & Decoder
Encode or decode URLs and URL components instantly with this free online URL Encoder & Decoder. Convert special characters, spaces, query parameters, and URL text safely in your browser.
Encoded Result
Enter a URL or text above to encode or decode it.
Try an Example
Select an example below to see how URL encoding handles spaces and special characters.
What Is URL Encoding?
URL encoding, also called percent encoding, converts characters that may have a special meaning inside a URL into a safe encoded representation. For example, a space can be represented as %20.
URL encoding is especially useful when a URL contains spaces, symbols, non-English characters, or other characters that need to be represented safely in a URL.
Why Is URL Encoding Needed?
URLs use certain characters for specific purposes. Characters such as ?, &, =, #, and % can have structural meanings. Encoding helps distinguish data from URL syntax.
- Query parameters and search URLs
- Web forms and submitted values
- API parameters
- Dynamic links
- Sharing URLs containing special characters
- Web development and URL handling
What Is URL Decoding?
URL decoding reverses percent encoding and converts encoded values back into readable text. For example, hello%20world becomes hello world.
Our decoder uses the browser's native decoding functions and safely reports an error when an encoded value is malformed.
URL Encoding vs URL Decoding
URL encoding converts text into a URL-safe encoded representation, while URL decoding converts percent-encoded text back into its readable form.
URL Encoding
Example: Hello World → Hello%20World
URL Decoding
Example: Hello%20World → Hello World
URL Encoding vs URL Component Encoding
JavaScript provides both encodeURI() and encodeURIComponent(). They serve different purposes.
encodeURI() is intended for a complete URI and preserves characters that form part of the URL structure. encodeURIComponent() is more aggressive and is generally appropriate when encoding an individual value, such as a query parameter.
How URL Encoding Works
Percent encoding represents characters using a percent sign followed by hexadecimal digits. This allows characters that need special handling to be represented safely.
hello world → hello%20world& → %26= → %3D? → %3FURL Encoding Examples
Example 1: Search URL
Original: https://example.com/search?q=hello world
Component encoded: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world
Example 2: Special Characters
Input: product name & price
Encoded: product%20name%20%26%20price
Example 3: Unicode Text
URL encoding can also represent Unicode characters, allowing international text to be safely included in URL components.
How to Use the URL Encoder & Decoder
Choose Encode URL or Decode URL.
Enter or paste your URL or text.
Select the appropriate encoding type.
Click the Encode or Decode button.
Copy your result and use it where needed.