URL Encoder / Decoder

๐Ÿ”ข URL Encoding โ€” Live Examples
See how special characters are transformed
Original Text
Hello World! Search: cafรฉ & rรฉsumรฉ (2024)
URL Encoded
Hello%20World%21%20Search%3A%20caf%C3%A9%20%26%20r%C3%A9sum%C3%A9%20%282024%29

Spaces become %20, ! becomes %21, & becomes %26, and accented characters like รฉ become %C3%A9

CharacterEncoded FormWhy It's Encoded
Space%20 (or +)URLs cannot contain raw spaces
&%26Used as query parameter separator
=%3DUsed for key=value pairs in query strings
?%3FMarks start of query string
#%23Marks fragment/anchor in URLs
+%2BHas special meaning (space) in some contexts
/%2FPath separator in URLs
รฉ (accented)%C3%A9Non-ASCII characters use UTF-8 encoding
๐Ÿš€ How to Use
Encode or decode any URL string instantly
1

Choose Encode or Decode

Select the Encode tab to convert plain text to URL-safe format, or the Decode tab to convert a percent-encoded URL back to readable text.

2

Paste Your Text or URL

Paste the raw text you want to encode, or the encoded URL/query string you want to decode. The tool accepts full URLs, query parameters, or just fragments.

3

Choose Encoding Type

Select encodeURIComponent (encodes everything โ€” best for query values), encodeURI (preserves URL structure characters), or raw percent-encoding for maximum compatibility.

4

Copy Result

The encoded/decoded result appears instantly. Click Copy to grab the result and use it in your code, browser address bar, API, or form submission.

๐Ÿ’ก Use Cases
Real situations where URL encoding is essential
๐Ÿ”Œ

API Development

Encode query parameter values before appending them to API request URLs.

๐Ÿ“ง

Email Links

Encode email addresses, subjects, and body text in mailto: links.

๐Ÿ”

Search Queries

Encode search terms with special characters, spaces, and non-English text.

๐ŸŒ

International URLs

Encode URLs with Arabic, Chinese, Hindi, or other non-ASCII characters.

๐Ÿ›’

eCommerce Filters

Encode product filter query strings with special characters in category names.

๐Ÿงช

Debugging

Decode garbled URL parameters from browser address bars or server logs.

โœจ Pro Tips
๐Ÿ”‘

encodeURIComponent vs encodeURI

Use encodeURIComponent for individual query parameter values โ€” it encodes everything including &, =, ?. Use encodeURI for full URLs โ€” it preserves structural characters like / and ?.

โž•

Space: %20 or +?

%20 is standard in modern URLs and APIs. The + sign for spaces is a legacy format from HTML form submissions (application/x-www-form-urlencoded). Most APIs prefer %20.

๐ŸŒ

Unicode Encoding

Non-ASCII characters are first converted to UTF-8 bytes, then each byte is percent-encoded. This is why รฉ becomes %C3%A9 โ€” two bytes in UTF-8.

๐Ÿ”

Decode Browser URLs

When you see a garbled URL like example.com?q=caf%C3%A9, paste it in the decoder to instantly see it as example.com?q=cafรฉ โ€” great for debugging redirects and logs.

โ“ Frequently Asked Questions
What is URL encoding? +
URL encoding (also called percent-encoding) converts characters that are not allowed or have special meaning in URLs into a safe format using a percent sign followed by two hexadecimal digits (e.g. space = %20). This ensures URLs are valid and correctly interpreted by web servers and browsers.
Why do URLs have %20 instead of spaces? +
The URL specification (RFC 3986) does not allow raw spaces in URLs. Spaces must be encoded as %20 to be valid. Some older form submission systems use + as a space replacement, but %20 is the modern, universally correct encoding for spaces in URLs.
What characters do NOT need encoding in a URL? +
The "unreserved characters" that are safe in URLs without encoding are: Aโ€“Z, aโ€“z, 0โ€“9, hyphen (-), underscore (_), period (.), and tilde (~). All other characters should be encoded for safe URL transmission.
What is the difference between encoding a URL vs a query string value? +
A full URL like https://example.com/search?q=hello needs only its query values encoded (not the slashes, colons, or question mark). A query string value like "cafรฉ & tea" needs full encoding of all special characters including & โ†’ %26. Use encodeURI() for full URLs and encodeURIComponent() for individual values.
Can I decode a full URL with query parameters at once? +
Yes โ€” paste the entire URL including query parameters into the decoder, and each encoded component will be decoded. The tool can also parse and display each query parameter individually as key-value pairs for easier reading.
๐Ÿ”— Related Tools