URL Encoder / Decoder
NewEncode and decode URLs online for free. Supports encodeURIComponent (for query string values) and encodeURI (for complete URLs). Convert special characters to percent-encoded format instantly — no signup.
Output will appear here...About this tool
URL encoding (also called percent-encoding) replaces characters that are not safe to include in a URL with a % followed by their two-digit hexadecimal code. For example, a space becomes %20 and & becomes %26. This is necessary whenever you include special characters—like query string values, path segments, or form data—in a URL, because many characters have reserved meanings in URL syntax. This tool supports both encodeURIComponent (for individual query values) and encodeURI (for complete URLs—preserves characters like / : ? # that have structural meaning).
How to use
- 1Paste the text or URL you want to encode into the input field.
- 2Choose "encodeURIComponent" for a single query value, or "encodeURI" for a full URL.
- 3The encoded result appears instantly — copy it with the copy button.
- 4Use the "Decode" tab to convert percent-encoded text back to readable form.
Frequently asked questions
- What is the difference between encodeURI and encodeURIComponent?
- encodeURI encodes a complete URL and leaves characters that have structural meaning in URLs (/ : ? # @ &) untouched. encodeURIComponent encodes a single value to be inserted into a URL (such as a query parameter) and encodes nearly everything, including / and ?. Use encodeURIComponent when inserting a user-supplied value into a URL.
- Why is a space sometimes %20 and sometimes +?
- In URL paths and query strings, a space is officially %20 per RFC 3986. However, HTML form submissions (application/x-www-form-urlencoded) historically encode spaces as +. Most servers accept both, but %20 is the RFC-correct representation.
- Which characters do not need encoding?
- The 'unreserved characters'—letters (A–Z, a–z), digits (0–9), and the symbols - _ . ~—are always safe in a URL and are never percent-encoded.
- When would I need to decode a URL?
- Common cases: reading a URL that was copied from a browser address bar and contains %20 or other encoded characters; debugging an API request where query parameters were double-encoded; parsing a redirect URL that contains an encoded destination URL as a parameter.