URL Encoder Online

Percent-encode text so that it can be used safely in a URL. Component mode (encodeURIComponent) encodes every reserved character and suits query values and path segments; Full URL mode (encodeURI) keeps structural characters such as : / ? # & = intact so that a complete URL stays valid.

How to use

  1. Type or paste the text you want to encode.
  2. Choose the encoding mode: Component for a single value, or Full URL for a complete, well-formed URL.
  3. Click Encode (or press Ctrl/⌘ + Enter).
  4. Copy the encoded output, or click Share to copy a link to the result.

Example

Input

name=Jane Doe & Co. <dev> "quoted"

Output

name%3DJane%20Doe%20%26%20Co.%20%3Cdev%3E%20%22quoted%22

Frequently asked questions

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent also encodes reserved characters such as & = ? / and #, so it is the right choice for a single query value or path segment. encodeURI leaves those characters alone and is meant for a complete URL that is already well-formed.

Why is a space encoded as %20 and not +?

Percent-encoding represents a space as %20. The + sign only means a space in HTML form submissions (application/x-www-form-urlencoded); this tool uses the standard JavaScript encoding functions, which produce %20.

How are non-ASCII characters such as é or emoji encoded?

They are first converted to their UTF-8 bytes and each byte is written as %XX. For example, "é" becomes %C3%A9.

How do I decode an encoded URL again?

Use the URL Decoder tool, which reverses percent-encoding back to readable text.

Related tools