Encode/Decode URL is a free online tool that percent-encodes special characters for safe use in URLs or decodes percent-encoded strings back to readable text. Essential for web developers working with query strings, API parameters, or URIs — this tool specifically implements encodeURIComponent()/decodeURIComponent() behavior, which is the correct choice for encoding individual values rather than whole URLs.
A URL can only reliably contain a limited set of characters — letters, digits, and a handful of punctuation marks defined by the URI specification (RFC 3986). Everything else — spaces, ampersands, question marks appearing inside a value, non-ASCII letters, emoji — has to be represented using percent-encoding: a % followed by two hexadecimal digits representing that character's byte value. A space becomes %20, an ampersand becomes %26, and an accented character like é becomes %C3%A9 once it's broken into its UTF-8 byte representation. Skip this step and the browser, server, or intermediate proxy is left guessing where one URL component ends and another begins — a bare & inside a query parameter value looks identical to the separator between two different parameters, which is exactly the class of bug this tool exists to prevent.
JavaScript actually provides two related but distinctly different encoding functions, and picking the wrong one is a common source of broken links. encodeURI() is meant for encoding an entire URL and deliberately leaves structural characters like /, ?, #, and : untouched, since those are meaningful delimiters in a full URL and shouldn't be escaped. encodeURIComponent() — what this tool uses — is meant for encoding a single component, such as one query parameter's value, and encodes everything except unreserved characters (letters, digits, and - _ . ~), including characters like &, =, and / that would otherwise be misread as URL structure if they appeared inside a value.
A related and equally important distinction is between percent-encoding, which this tool implements, and HTML entity encoding (turning & into &), which is a completely separate escaping mechanism used to prevent characters from being misinterpreted as HTML markup rather than URL structure. Confusing the two is a frequent source of double-encoding bugs, where a value gets percent-encoded and then HTML-entity-encoded (or vice versa) and comes out wrong on the other end.
Everything runs using the browser's native, spec-compliant encodeURIComponent() and decodeURIComponent() functions — no custom regex substitution that could miss an edge case — and no text you enter is ever sent to a server.
Building or debugging a sitemap URL? Generate Sitemap produces properly-formed URLs directly.