URL Encode

Encode text for safe use in URLs by converting special characters to percent-encoded format.

Percent-encode text so it's safe to put in a URL: spaces become %20, & becomes %26 and é becomes %C3%A9. Choose Component to encode a single value such as a search term or a parameter (the most common need), Full URL to keep the characters that give a URL its structure (: / ? & = #), or Form data to write spaces as + the way HTML forms do. Characters outside basic English are encoded as UTF-8 bytes, as browsers expect. The result updates as you type, and the URL decode tool reverses it.

Need the reverse? URL Decode

Common use cases

  • Put a search term or an email address into a query string
  • Build a link with special characters in its parameters
  • Encode a redirect URL inside another URL
  • Prepare form-style data for an API request

How to use

  1. Type or paste the text to encode.
  2. Choose Component, Full URL or Form data.
  3. Copy the encoded result.

FAQ

What's the difference between Component and Full URL?

Component (encodeURIComponent) encodes everything that could break a URL, including / ? & and =, so use it for one value. Full URL (encodeURI) leaves those characters alone, so use it for a complete address that just has spaces or accents in it.

Should a space be %20 or +?

%20 works everywhere. + means a space only in query strings sent by HTML forms (application/x-www-form-urlencoded); in paths it's a literal plus.

Why is my URL encoded twice?

If you encode text that already contains %20, the % becomes %25 (%2520). Decode it first, or only encode the raw value.