URL Encoder & Decoder
Convert text to percent-encoded form for safe use in URLs, and decode encoded URLs back into readable text. Choose whether reserved characters like /, ?, and & are encoded.
Why URLs need encoding
URLs may only contain a limited set of ASCII characters. Anything outside that set — spaces, accented letters, emoji — plus characters that have structural meaning must be percent-encoded: replaced by % followed by their hex byte value. A space becomes %20, an ampersand becomes %26, and é becomes %C3%A9 because it is two bytes in UTF-8.
The two encoding modes
- Encode reserved characters on (encodeURIComponent) — encodes
/ ? & = # :as well. Use this for a value going inside a query parameter. Without it, a value containing&would be read as the start of a new parameter and silently break your URL. - Encode reserved characters off (encodeURI) — leaves the URL's structural characters intact. Use this when encoding a complete URL that you want to remain a working URL.
The mistake that breaks query strings
The single most common bug here is encoding a whole URL when you meant to encode one parameter. If a user searches for "cats & dogs" and you build ?q=cats & dogs without component encoding, the server sees a parameter q=cats and a separate parameter dogs. The search silently returns wrong results with no error. Always component-encode each value individually as you build the string, never the assembled URL.
Plus signs and spaces
Spaces have two encodings for historical reasons: %20 everywhere, and + inside HTML form submissions. They are not interchangeable — a literal + in a URL path means a plus sign, but in a query string it often means a space. When decoding, this tool treats + as a space, which matches how form data is submitted and is the behaviour you want the vast majority of the time.