URL Encode/Decode

Percent-encode text for safe use in URLs or decode it back, with component and full-URL modes. All local, nothing uploaded.

Common encodings

CharacterNameEncoded
(space)Space%20
&Ampersand%26
?Question mark%3F
/Forward slash%2F
#Hash / fragment%23
+Plus%2B
=Equals%3D
@At sign%40

Why URLs need encoding

A URL is only allowed to contain a limited set of characters, and some of those - like ?, &, = and # - have structural meaning that separates the path from the query and the fragment. If a value you want to pass contains one of them, or a space, or a non-English letter, it has to be percent-encoded so the browser and server read it as data rather than as structure.

Component vs full URI

This tool exposes both of JavaScript's encoders. Component uses encodeURIComponent, which escapes the reserved characters too - the right choice for a single query parameter value, a path segment or anything you are slotting into a larger URL. Full URI uses encodeURI, which deliberately leaves : / ? & = # alone so a complete, already-structured link keeps working while still escaping spaces and other unsafe characters.

A quick example. Encoding hello world&more in component mode gives hello%20world%26more - the ampersand is escaped so it cannot be mistaken for a parameter separator. In full-URI mode you get hello%20world&more, with the ampersand preserved.

Decoding safely

Paste a percent-encoded string, switch to Decode, and you get the original text back. If the input contains a malformed escape - a stray % or an incomplete %2 - the tool tells you instead of failing silently. Working with other formats? The Base64 encoder covers binary-safe transport, the HTML entity encoder handles characters for web page display, and the JSON formatter tidies API payloads.

Frequently asked questions

What is URL encoding?
URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a percent sign followed by their hexadecimal byte value. A space becomes %20, an ampersand becomes %26, and so on. It lets you put arbitrary text into a URL without breaking it.
What is the difference between component and full-URL encoding?
Component mode (encodeURIComponent) escapes everything that is not a plain letter, digit or a handful of safe symbols, including / ? : & = # - use it for a single query value or path segment. Full-URL mode (encodeURI) leaves those structural characters intact so an already-built URL stays working - use it to tidy a whole link.
Why is a space sometimes %20 and sometimes a plus sign?
In the path and in percent-encoding a space is %20. In the query string of older HTML form submissions a space is encoded as a plus sign (application/x-www-form-urlencoded). Both decode back to a space, but they are not interchangeable everywhere - inside a path a plus is a literal plus.
Is it safe to encode a full URL with encodeURIComponent?
Only if you intend to embed that whole URL as a single value inside another URL, for example a redirect_uri parameter. If you run a normal link through encodeURIComponent it will escape the :// and slashes and the link will no longer work. Use full-URL mode for that.