URL Encoder/Decoder
Encode or decode URL strings
About URL Encoder/Decoder
URL Encoder/Decoder is a free online tool that converts text into percent-encoded URL format and decodes percent-encoded strings back to readable text. Paste any text containing special characters, click Encode, and every character that is not allowed in a URL is replaced with its percent-encoded equivalent. Paste a percent-encoded URL and click Decode to convert it back to human-readable form. Instant, browser-based, no sign-up needed.
URLs can only safely contain a restricted set of characters: unreserved characters (A–Z, a–z, 0–9, hyphen, underscore, period, tilde) and reserved characters that have special structural meaning in URLs (colon, slash, question mark, hash, brackets, at sign, exclamation mark, dollar sign, ampersand, apostrophe, parentheses, asterisk, plus, comma, semicolon, equals). Any other character — including spaces, non-ASCII Unicode characters, and most punctuation — must be percent-encoded. Percent encoding replaces each byte of the character's UTF-8 representation with a % sign followed by two hexadecimal digits. A space becomes %20, the ñ character becomes %C3%B1, and an ampersand becomes %26.
Understanding the difference between encoding a full URL and encoding a URL component is critical. Encoding a full URL (including the protocol, domain, slashes, and query string delimiters) would encode the structural characters (: / ? & =) that give the URL its meaning, breaking the URL entirely. URL component encoding — encodeURIComponent in JavaScript — encodes only the value of a query parameter or path segment, leaving the surrounding URL structure intact. Our tool supports both modes so you can encode individual parameter values or handle full URLs as needed.
Query string injection is a security concern that proper URL encoding prevents. When building URLs dynamically by concatenating user input, any special characters in the input must be encoded or they can alter the URL's meaning and enable injection attacks. A user entering a search term containing & or = could inject additional query parameters that change the request's behaviour. Encoding user input before inserting it into a URL neutralises these characters by converting them to percent-encoded literals.
Developers use URL Encoder/Decoder to build and debug query strings, inspect encoded API parameters, and fix URLs containing raw special characters that cause server errors. REST API clients encode parameter values before sending requests. Frontend developers encode file path segments containing spaces or non-ASCII characters. Backend developers decode incoming request parameters to retrieve original user input. DevOps engineers decode encoded values in AWS CloudWatch logs, Nginx access logs, and load balancer access logs where URLs are stored percent-encoded.
Internationalised URLs are a common use case. Path segments and query parameters containing non-ASCII text — accented letters, Chinese/Japanese/Korean characters, Arabic, Cyrillic — must be percent-encoded. A Hindi blog post title encoded as a URL slug becomes a long sequence of %E0%A4... characters. Decoding these back to readable text is necessary when analysing traffic logs, sharing URLs across platforms, or understanding the actual page being accessed.
URL Encoder/Decoder works entirely in your browser using JavaScript's encodeURIComponent() and decodeURIComponent() functions, which correctly handle all Unicode characters and produce standards-compliant percent-encoded output. Encoding preserves unreserved characters (letters, digits, - _ . ~) untouched. Decoding handles both + (legacy space encoding in form submissions) and %20 (standard space encoding). No data is sent to any server.
How to Use URL Encoder/Decoder
- 1Paste your URL or text into the input field
- 2Click "Encode" to convert special characters to percent-encoded format
- 3Or click "Decode" to convert a percent-encoded string back to readable text
- 4Copy the result with a single click
Frequently Asked Questions
URLs can only safely contain a specific set of ASCII characters. Spaces, non-ASCII characters, and most punctuation must be percent-encoded (e.g., space → %20, ñ → %C3%B1) so they are transmitted correctly without being misinterpreted as URL structural characters.
%20 is the standard percent-encoding for a space and works in all URL contexts including path segments and query strings. The + sign represents a space only in query string values (form-encoded data) — a legacy convention from HTML form submissions. Use %20 for maximum compatibility.
Only encode individual component values — the values of query parameters and path segments. Encoding the full URL would encode the structural characters (://?&=) that define the URL structure, breaking it. Use encodeURIComponent logic for parameter values only.
Unreserved characters are safe in all URL positions and do not need encoding: A–Z, a–z, 0–9, hyphen (-), underscore (_), period (.), and tilde (~). All other characters should be encoded when used as data values rather than URL structure.
No. All encoding and decoding uses browser-native JavaScript functions. Your data never leaves your device.
You might also like
Try next