The URL Encoder/Decoder converts special characters to URL-safe percent-encoded format and decodes percent-encoded strings back to readable text. Essential for building API requests, constructing query strings, debugging encoded URLs, and working with web forms. Choose between component encoding (for query parameters) and full URL encoding (preserves URL structure). All processing happens locally in your browser - no data is transmitted.
Paste the text, URL parameter, or encoded URL you want to process. For encoding, enter the raw text. For decoding, enter the percent-encoded string.
Click 'Encode Component' for query parameter encoding (encodes everything except A-Z, 0-9, and -_.~). Click 'Encode Full URL' to encode a complete URL (preserves :, /, ?, #, &, =). Click 'Decode' to convert percent-encoded text back to readable form.
The encoded or decoded result appears in the output area. Click 'Copy Output' to copy it to your clipboard.
Click Clear to reset both fields and process a new URL or text string.
URL encoding (percent-encoding) converts characters that aren't allowed in URLs into a format using % followed by two hexadecimal digits. For example, a space becomes %20, and & becomes %26. This ensures URLs are transmitted correctly across the internet.
Encode Component (encodeURIComponent) encodes everything except unreserved characters (A-Z, a-z, 0-9, -, _, ., ~). Use it for individual query parameter values. Encode Full URL (encodeURI) preserves URL-structural characters like :, /, ?, #, &, =. Use it when encoding a complete URL.
Use URL encoding when: passing special characters in query strings, submitting form data, building API request URLs, handling file names with spaces in URLs, or passing JSON or other structured data as URL parameters.
URLs cannot contain literal spaces. The %20 encoding represents a space character in URL format. Some systems also use + for spaces in query strings (application/x-www-form-urlencoded). Both are valid space representations in different URL contexts.
Using the wrong encoding function can break URLs. If you encode a full URL with encodeURIComponent, it will encode the :// and / characters, breaking the URL structure. Always use encodeURIComponent for parameter values and encodeURI for complete URLs.