What URL encoding is
URL encoding, also called percent-encoding, replaces characters that are not safe in a web address with a percent sign followed by a code. A space becomes %20, an ampersand becomes %26, and so on. This lets you put any text — spaces, accents, symbols — into a URL without breaking it. This tool encodes text for safe use in URLs and decodes percent-encoded text back to readable form.
Why it is necessary
URLs have a limited set of characters they can safely contain. When you put a search term, a parameter value or a path segment that includes spaces, slashes, question marks or non-English letters directly into a URL, those characters can be misinterpreted and break the link. Encoding converts them into a safe representation that servers and browsers decode correctly. Anyone building query strings, API calls or links programmatically needs this constantly.
Encoding and decoding
Encoding takes readable text and makes it URL-safe — essential when you are constructing a link or a query parameter. Decoding does the reverse, turning a percent-encoded string back into readable text, which is useful when you are reading a URL someone sent you, debugging an API call, or inspecting what a parameter actually contains. This tool does both with one click each and handles accented and non-English characters correctly through UTF-8.
Common situations
Building a search URL where the query contains spaces and symbols. Passing a value that includes an ampersand or equals sign through a query parameter without breaking the URL structure. Reading a long, encoded URL to understand what it points to. Constructing API requests where parameters must be encoded. Because it runs in your browser, you can safely encode or decode values that contain sensitive data.
What URL encoding is
URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a percent sign followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and so on. URLs are limited to a small set of ASCII characters by the RFC 3986 standard, so anything outside that set — spaces, accents, emoji, or reserved symbols like ? & = # when used as data — must be encoded to travel from browser to server without breaking the URL's structure.
encodeURI versus encodeURIComponent
JavaScript offers two encoding functions, and choosing wrong is a common bug. encodeURIComponent encodes everything reserved and is what you want for individual values you put into a query string — a search term, a parameter value, a redirect target. encodeURI preserves URL structure characters like / ? & = and is meant for encoding a whole URL while keeping it functional. The rule of thumb: use encodeURIComponent for the values inside a URL, and encodeURI only for an entire URL. This tool encodes components, which is what you need most of the time.
Common URL encoding mistakes
Two bugs dominate. Double-encoding happens when you encode a string that is already encoded — %20 becomes %2520 — which breaks the link; only encode raw text, never an already-encoded URL, and decode first if you are unsure. The other is the plus-sign ambiguity: in a query string, + can mean a space (from HTML form encoding), but in a URL path it is a literal plus. When in doubt, use %20 for a space, which is unambiguous everywhere. Also remember that an unencoded & inside a value will be misread as a parameter separator, splitting your data.