UE

URL Encoder / Decoder

Encode or decode URL components using encodeURIComponent / decodeURIComponent

About URL Encoding

  • encodeURIComponent — encodes all characters except: A–Z a–z 0–9 - _ . ! ~ * ' ( )
  • decodeURIComponent — decodes a percent-encoded string back to its original form
  • Use encoding when embedding URLs inside other URLs, query parameters, or form data
Opens your print window: choose "Save as PDF". The file is named "URL Encoder / Decoder - MondayTool".
About this tool

Last updated:

Encode and decode URLs instantly

This URL encoder / decoder converts text to percent-encoding and back. Use it to put spaces, symbols or non-English letters safely inside a query string, or to read an encoded link such as search%3Fq%3Dred%20shoes. The result updates as you type.

How to use it

  1. Choose Encode or Decode. Switching tabs clears both boxes.
  2. Paste or type your text or URL in the input box.
  3. Read the result in the output box and click Copy.

How it works

Encoding uses JavaScript's encodeURIComponent. Every character except A–Z a–z 0–9 - _ . ! ~ * ' ( ) is turned into its UTF-8 bytes, written as % plus two hex digits. Decoding uses decodeURIComponent to reverse it.

Example: hello world & más encodes to hello%20world%20%26%20m%C3%A1s. The space becomes %20, the ampersand %26, and “á” becomes two bytes, %C3%A1.

Because this encodes a component, a full address is encoded too: https://a.com/?q=red shoes becomes https%3A%2F%2Fa.com%2F%3Fq%3Dred%20shoes. That is what you want when passing a URL as a parameter inside another URL. To fix one value, encode only that value.

Common encoded characters

CharacterEncodedCharacterEncoded
space%20&%26
/%2F=%3D
?%3F#%23
:%3A+%2B
@%40,%2C

Frequently asked questions

Why does the decoder show “Invalid encoded string”?

The input contains a % that is not followed by a valid two-digit hex code, or the bytes do not form valid UTF-8. Check that the string was copied in full.

Why is + not turned into a space?

decodeURIComponent only decodes % codes. Form data often uses + for spaces; replace + with %20 before decoding if you need that.

Is my text sent to a server?

No. Encoding and decoding run in your browser.

More to explore

Related Network & API

Browse all tools from the same category.

Showing 1-2 of 7