URL Encoder and Decoder

Encode or decode URL percent-encoding. Component or full URL mode.

What is URL encoding (percent encoding)?

URLs can only contain a limited set of characters. Anything outside that set, like spaces, ampersands inside a value, accented letters, or emoji, has to be converted into percent-encoded form: a percent sign followed by the hexadecimal value of each byte, such as %20 for a space. This process is called URL encoding or percent encoding, and reversing it is URL decoding. This tool does both: paste text to url encode online, or paste an encoded string to url decode online and see the readable original.

You typically need an encoder when a query parameter value contains reserved characters, for example a redirect URL embedded inside another URL, a search term with spaces, or an email address with a plus sign. You need a decoder when you are debugging a link from server logs, an analytics report, or an email click tracker and want to see what was actually passed. The tool offers two encoding modes: component mode (encodeURIComponent) for individual values, which encodes reserved characters like ?, &, and =, and full URL mode (encodeURI), which leaves URL structure intact and only encodes characters that are invalid anywhere in a URL.

Everything runs locally in your browser using the standard JavaScript encoding functions, so nothing you paste is sent to a server. Results update as you type, and a swap button lets you feed the output straight back in to go the other direction.

How to encode or decode a URL

  1. Pick Encode or Decode

    Use the tabs at the top to switch between encoding plain text and decoding a percent-encoded string.

  2. Choose an encoding mode

    When encoding, select Component (encodeURIComponent) for individual parameter values, or Full URL (encodeURI) to encode a complete URL without breaking its structure.

  3. Paste your text

    Type or paste into the input box. The result appears instantly in the Result panel; invalid encoded input shows an error instead of silently failing.

  4. Copy or swap

    Click Copy to put the result on your clipboard, or click Swap to move the result into the input and flip between encode and decode.

Frequently asked questions

What does %20 mean in a URL?

%20 is the percent-encoded form of a space character. URLs cannot contain literal spaces, so a space is replaced by a percent sign followed by 20, the hexadecimal code for a space in ASCII and UTF-8.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes reserved characters like ?, &, =, and / as well, so it is the right choice for a single parameter value. encodeURI leaves those structural characters alone and only encodes characters that are invalid anywhere in a URL, so it is used to encode a complete URL without breaking it.

Why does decoding sometimes fail with an error?

Decoding fails when the input contains a malformed escape sequence, for example a percent sign that is not followed by two valid hexadecimal digits. The tool shows an invalid input error in that case rather than returning a partial result.

Is a plus sign the same as %20?

Only in one specific context: the application/x-www-form-urlencoded format used by HTML form submissions encodes spaces as +. In URL paths and in standard percent encoding, a space is %20 and a literal plus sign is just a plus sign, so the two are not interchangeable everywhere.

Is it safe to paste sensitive URLs into this tool?

Yes. The encoding and decoding happen entirely in your browser with JavaScript built-in functions, and nothing you paste is uploaded or stored on a server.

Shorten URLs without manually encoding anything.

ReSlug handles encoding automatically when you create short links from any URL.

Create a free account