Encode and decode URLs online
URLs are allowed to contain only a limited set of characters, so whenever a link needs to carry a space, an accent, an ampersand or a non-English word, those characters must be safely encoded. This free URL encoder and decoder converts special characters into percent-encoded form and turns encoded strings back into readable text, updating live as you type. It is a quick fix for broken links, messy query strings and confusing API requests — and because it runs in your browser, your data stays private.
What URL encoding actually is
Also known as percent encoding, URL encoding replaces any character that is unsafe or reserved with a percent sign followed by two hexadecimal digits representing that character's byte value. A space becomes %20, an ampersand becomes %26, a question mark becomes %3F, and so on. This keeps the URL syntactically valid and ensures that browsers, servers and proxies all interpret it the same way. Without it, a search query containing a space or a "&" could break the link entirely or be misread.
Component mode versus full-URL mode
The tool offers two modes, and choosing the right one matters. Component mode encodes a single value that will be placed inside a URL — such as a search term in ?q=your text here. It encodes every reserved character, including slashes and ampersands, so the value cannot accidentally break the URL's structure. Full-URL mode is for encoding a complete address; it deliberately preserves the structural characters like /, ?, & and # that define how the URL is put together, so the link remains clickable. As a rule: encode individual values in component mode, and whole URLs in full-URL mode.
When you need it
- Passing search terms, email addresses or names as query-string parameters.
- Building links that include spaces, quotes or characters from other languages.
- Debugging API requests and webhooks where a value arrives garbled or truncated.
- Reading long tracking or marketing links by decoding them to see exactly where they point.
Common encodings at a glance
A few mappings come up so often they are worth recognising on sight: a space is %20, an ampersand %26, a question mark %3F, a forward slash %2F, a hash %23, and an equals sign %3D. When you spot a string full of these percent codes, you are looking at an encoded URL — paste it into the decoder and it becomes readable again.
Encoding versus form encoding
You may notice that spaces sometimes appear as + rather than %20. That plus-sign convention comes from an older format called application/x-www-form-urlencoded, used when HTML forms submit data. In modern percent encoding a space is always %20, but because both styles are so widespread, most servers happily decode either back into a space. Being aware of the two conventions helps you understand why the same value can look slightly different depending on where it came from.
How to use the tool
Choose Encode or Decode, pick the mode that fits your task, and type or paste your text. The result appears instantly, ready to copy. If you decode a malformed string — for example one with a stray percent sign — you will get a clear error rather than silent corruption. The Swap button flips the output into the input and reverses direction, making it easy to confirm that a value round-trips correctly. It is a small tool that quietly prevents a whole category of link and API bugs.
A worked example of URL encoding
Seeing encoding applied to a real link makes the concept click. Imagine you want to link to a search results page for the phrase "free & fast tools" on a site. The raw URL might look like https://example.com/search?q=free & fast tools, but that will break: the space ends the URL as far as some systems are concerned, and the ampersand looks like the start of a new query parameter. Encode just the query value in component mode and "free & fast tools" becomes free%20%26%20fast%20tools, giving a valid link of https://example.com/search?q=free%20%26%20fast%20tools that every browser and server reads correctly. Notice that only the value was encoded, not the structural parts of the URL like the ? and = — that is exactly what component mode is for. If you had instead needed to encode a whole address containing accented characters, full-URL mode would preserve the structure while making the rest safe. Working through an example like this is the fastest way to build an intuition for when each mode applies.
Frequently asked questions
What is URL encoding?
URL encoding, or percent encoding, replaces unsafe characters in a URL with a percent sign and two hex digits — for example a space becomes %20 — so the URL stays valid.
What is the difference between the two modes?
Component mode encodes every reserved character including / ? & = and #, which is right for query-string values. Full-URL mode keeps those structural characters intact so a complete link still works.
Why does a space sometimes become + instead of %20?
The + convention comes from the older form-encoding format used by HTML forms. In standard percent encoding a space is %20; most servers decode both back to a space.
Is my URL sent anywhere?
No. Encoding and decoding happen entirely in your browser, so nothing you enter is uploaded or stored.