URL Encoder / Decoder
Encode text to percent-encoded URL format or decode a URL-encoded string back to readable text.
About URL Encoding
URLs can only contain a limited set of characters defined by RFC 3986. Characters outside this set — including spaces, ampersands, equal signs, and non-ASCII characters — must be percent-encoded. This tool uses JavaScript's encodeURIComponent, which correctly handles all Unicode input including accented characters and emoji.
Use the "Swap" button to quickly move the output back to the input field for a second pass, such as encoding an already-encoded URL for use as a nested parameter.
Frequently Asked Questions
What is URL encoding?
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and & becomes %26.
When do I need to URL-encode a string?
You need URL encoding when passing query string values that contain special characters, when embedding a full URL as a parameter in another URL, or when constructing API requests that include arbitrary text.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL and leaves characters like / ? & = unchanged. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ). This tool uses encodeURIComponent, which is correct for encoding individual values.
Can I decode a partially encoded URL?
Yes, as long as the percent-encoding is valid. If the string contains invalid encoding sequences (e.g. a lone % not followed by two hex digits) the tool will report a decoding error.
Related Tools
SHA-256 Generator
Generate a SHA-256 hash from any string using the Web Crypto API.
MD5 Generator
Generate an MD5 hash from any input string, implemented in pure JavaScript.
Timestamp Converter Tool
Convert Unix timestamps to human-readable dates and vice versa.
Base64 Encoder / Decoder
Encode plain text to Base64 or decode Base64 back to readable text.