Home Developer Tools URL Encoder / Decoder
🔗
Dev

URL Encoder / Decoder

Encode plain text to URL-safe percent-encoded format and decode percent-encoded URLs back to readable text. Supports full URL encoding and component encoding. 100% browser-based.

🔒 Browser-based↕ Encode & decode🌐 Full URL or component⚡ Instant results
Switch Tool:
🔒 100% Private — All processing runs entirely in your browser. Nothing is sent to any server.

📖How to Use the URL Encoder / Decoder

  1. 1
    Paste your text or URL

    Paste the text you want to URL-encode, or the percent-encoded string you want to decode, into the input box. You can encode a single query parameter value, or a full URL.

  2. 2
    Choose encode or decode mode

    Use Encode to convert special characters to percent-encoded sequences (e.g. space becomes %20, & becomes %26). Use Decode to convert percent-encoded strings back to readable text. Choose between full URL encoding or component encoding (which also encodes / and ?).

  3. 3
    Copy the result

    The output appears instantly. Click Copy to copy the result to your clipboard, or use Download to save it as a text file. The character count and encoded/decoded character list are shown below the output.

💡Quick Reference

CharacterEncoded
Space%20
&%26
=%3D
+%2B
#%23

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent-encoding) converts characters that are not safe for use in a URL into a percent (%) followed by two hexadecimal digits representing the character's ASCII or UTF-8 code. For example, a space becomes %20, & becomes %26, and = becomes %3D. URL encoding ensures that special characters in query strings, paths, and parameter values do not interfere with URL parsing.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a complete URL — it leaves characters that are valid URL structure intact (: / ? # [ ] @ ! $ & ' ( ) * + , ; =) and only encodes characters that are not valid anywhere in a URL. encodeURIComponent encodes a URL component (like a query parameter value) — it encodes almost everything except letters, digits, and - _ . ~. Use encodeURIComponent for individual values in query strings.

Why does a space sometimes appear as + instead of %20?

Both %20 and + represent a space in URLs, but in different contexts. %20 is the standard percent-encoding for space used in path segments. + is used to represent space specifically in application/x-www-form-urlencoded data (HTML form submissions), not in path components. This tool uses %20 for standard URL encoding. Some servers accept both; others are strict about the format.

Which characters must be percent-encoded in a URL?

Characters that must be encoded in URL query strings include: space (%20), & (%26), = (%3D), + (%2B), # (%23), % (%25), / (%2F), ? (%3F), @ (%40), and all non-ASCII characters (emoji, accented letters, CJK characters). Reserved characters that structure URLs (like / and ?) should only be encoded when they appear as literal data within a component, not as structural separators.

How are non-ASCII characters URL encoded?

Non-ASCII characters (like accented letters é, ü, or emoji 😀) are first encoded as UTF-8 bytes, then each byte is percent-encoded. For example, é (U+00E9) encodes as two bytes in UTF-8 (0xC3, 0xA9), so it becomes %C3%A9. An emoji like 😀 (U+1F600) is four UTF-8 bytes and becomes %F0%9F%98%80. This ensures URLs work correctly regardless of character set.

When would I use URL encoding in practice?

Common use cases include: building API query strings dynamically with user-provided values, creating share links that contain titles or descriptions with special characters, encoding redirect_uri parameters in OAuth flows, constructing mailto: links with subjects and body text, sending data in HTTP POST bodies as form-urlencoded, and URL-encoding file names that contain spaces or special characters.