URL Encoder / Decoder

Convert spaces, non-ASCII characters, and special characters in a URL into percent-encoding, or decode them back to plain text.

What is URL encoding?

A URL originally only allows letters, digits, and a limited set of special characters, so spaces, accented letters, or characters from non-Latin scripts must be converted into a safe format called percent-encoding (for example, a space becomes %20, and "Γ©" becomes %C3%A9). When you type a non-ASCII search term into your browser's address bar, it's actually sent to the server in this encoded form.

encodeURIComponent vs. encodeURI

This tool uses encodeURIComponent, the method used to encode a single component of a URL, such as a query-string value. It encodes structurally important characters like /, ?, &, and = as well, so it's meant for encoding a single parameter value, not an entire URL.

Frequently Asked Questions

Should I encode the whole URL or just part of it?

Generally you should only encode the parameter value in the query string (like a search term), not the entire URL. For https://example.com/?q=search+term, you'd only encode the "search term" part.

Is what I type sent to a server?

No. All encoding and decoding happens entirely in your browser and is never sent to a server.