URL Encoder

Convert text into percent-encoded form so it can be used safely inside a web address.

Tip: press Ctrl + Enter to run.

About the URL Encoder

URLs can only contain a limited set of characters. Spaces, accented letters, emoji and symbols such as & or ? have to be written as a percent sign followed by hexadecimal codes. For example, a space becomes %20. This is called percent-encoding or URL encoding.

Use URL component mode for a single value, such as a search term in a query string. It encodes every reserved character. Use Full URL mode when you have a complete address and only want to fix spaces and non-ASCII characters while keeping its structure. Text is encoded as UTF-8, which is the web standard.

How to use it

  1. Paste the text or URL to encode.
  2. Choose component or full URL mode.
  3. Click Encode URL and copy the result.

Example

In URL component mode:

Input
coffee & tea: café/bar?
Result
coffee%20%26%20tea%3A%20caf%C3%A9%2Fbar%3F

When to use it

  • Building query strings for links and API requests.
  • Adding search terms or email subjects to URLs.
  • Sharing links that contain spaces or non-English characters.
  • Debugging encoding problems in web apps.

Frequently asked questions

What is the difference between the two modes?

Component mode encodes reserved characters such as / ? & = because they would change the meaning of a URL. Full URL mode leaves them alone so the address still works.

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

%20 is valid everywhere in a URL. The plus sign only means a space in HTML form data.

How do I decode a URL?

Use the URL Decoder.

Is the text I enter kept private?

Yes. The URL Encoder runs entirely in your web browser, so your text is never uploaded to or stored on our servers. Like most free websites, TextForge shows ads from Google, which may use cookies. See our Privacy Policy for details.