URL Encoder / Decoder

Encode and decode URLs online. Free URL encoder/decoder - convert special characters to percent-encoding and back.

🔒 Your text stays in your browser - nothing is sent to our servers
Input
Encoded URL
How to Use

Three steps to get started

1

Paste your text or URL

Enter the text or URL-encoded string you want to convert in the input area.

2

Click Encode or Decode

Click "Encode" to convert special characters to percent-encoding, or "Decode" to convert back to plain text.

3

Copy the result

Click Copy to copy the encoded or decoded result to your clipboard.

About This Tool

URL encoding and percent-encoding explained

URL encoding - formally percent-encoding, defined in RFC 3986 - replaces characters that a URL cannot carry literally with a % followed by the two hexadecimal digits of each UTF-8 byte. A space becomes %20, & becomes %26, and é becomes %C3%A9 because it occupies two bytes in UTF-8. Only unreserved characters pass through untouched: A–Z, a–z, 0–9, and the four marks -, _, ., ~.

The reason this matters is that a URL is a structured string, not a bag of text. Characters like ?, #, &, =, and / are reserved delimiters - they mark where the path ends, where the query begins, and where one parameter stops and the next starts. Drop an unencoded & into a value and the server sees an extra parameter; drop in a # and everything after it is silently discarded before the request is even sent, because fragments never leave the browser.

Typical situations that require it:

  • Search parameters: ?q=fish & chips must become ?q=fish%20%26%20chips
  • Redirect targets: a whole URL nested inside another one - ?next=https%3A%2F%2Fexample.com%2Fdocs
  • OAuth and JWT values: Base64 output contains +, /, and =, all of which change meaning in a query string
  • API filters and file paths: slashes inside a path segment need %2F
  • Non-Latin content: Cyrillic, CJK, and emoji all expand to multi-byte percent sequences

Common percent-encoding mistakes

Encoding the whole URL instead of the value. Running encodeURIComponent() on https://example.com/a?b=c converts the colons and slashes too, producing a string that is no longer a usable address. The rule is to encode each parameter value individually, then assemble the URL - or better, let URLSearchParams do it for you.

Double encoding. Encoding an already-encoded string turns %20 into %2520, because the % itself gets encoded. This shows up as literal %20 text appearing on a page, and it is usually caused by two layers of code both trying to be safe. Decode once and check before encoding again.

Assuming + means space. RFC 3986 uses %20; the older application/x-www-form-urlencoded format used by HTML form submissions uses +. In a form body a literal plus sign must be written %2B, which is why pasting a phone number or a Base64 token into a form field sometimes loses characters. This tool encodes spaces as %20 and accepts either form when decoding.

Under the hood it calls the browser's own encodeURIComponent() and decodeURIComponent(), the same implementations your JavaScript and Node.js code use, so what you see here is exactly what your application will produce. Nothing is transmitted - the conversion happens in the page you are already looking at, which makes it safe for tokens and signed URLs.

FAQ

Frequently Asked Questions

Related Tools