Free URL Encoder & Decoder
The URL Encoder & Decoder converts text to and from percent-encoding (URL encoding). Encode query strings and parameters, or decode them back to readable text.
Decoding is the other half of the same operation, and the components of a URL are broken out by the URL Parser. When the encoded value must become a readable path, the Slug Generator produces one.
How to use the URL Encoder
- 1 Paste the text or URL you want to encode into the box.
- 2 Choose encodeURIComponent for a value going inside a query string, or encodeURI for a whole URL.
- 3 The encoded output appears immediately with every unsafe character converted to %XX form.
- 4 Switch to decode mode to turn a percent-encoded string back into readable text.
Percent-encoding specifications and URI safety
The URL encoder translates arbitrary characters into standard percent-encoded sequences according to RFC 3986. Standard URIs permit only an unreserved set of characters (alphanumerics, hyphens, periods, underscores, and tildes). All reserved punctuation and non-ASCII characters are converted into a percent symbol followed by their two-digit hexadecimal UTF-8 octet values.
Proper percent-encoding prevents query string corruption, path truncation, and parameter injection across web servers and APIs. For example, spaces are encoded as %20 (or + in application/x-www-form-urlencoded payloads), and ampersands are encoded as %26 to avoid being misinterpreted as parameter delimiters.
- Converts reserved delimiters and UTF-8 characters into standard %XX hex pairs.
- Protects query parameters containing spaces, symbols, and non-Latin alphabets.
- Ensures full cross-platform compatibility across HTTP clients and web proxies.
- Supports instant round-trip decoding to inspect encoded query strings and paths.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI leaves URL structure characters alone, so "://" and "?" survive — use it on a complete URL. encodeURIComponent escapes those too, which is what you want for a single parameter value, otherwise an "&" inside your data would be read as a parameter separator.
Why does a space become %20 in one place and + in another?
Both are valid in different contexts. %20 is correct in a URL path; "+" is the convention for spaces inside form-encoded query strings. This tool uses %20, which is safe everywhere.
Do I need to encode non-English characters?
Yes, for a reliable URL. Non-ASCII characters must be UTF-8 encoded and then percent-escaped, so "é" becomes %C3%A9. Browsers often display the readable form, but the encoded form is what travels on the wire.
Related Developer Tools
You might also need
Tools from other categories that people pair with the URL Encoder: