Encode / Decode

URL Encode

Percent-encode text for safe use in URLs, query strings and form data — free, instant and private, entirely in your browser.

Output

100% in your browser — nothing you type is ever uploaded.

How to URL encode text

  1. Type or paste your text into the input box above.
  2. The percent-encoded result appears instantly in the output box.
  3. Click Copy to copy the encoded string to your clipboard.

What this tool does

This tool percent-encodes text so it can be safely used as a value inside a URL — for example a query string parameter or a path segment. Reserved and non-ASCII characters are replaced with a % followed by their hex byte value; letters, digits and the small set of URL-safe punctuation are left untouched.

Common reasons to URL encode text

  • Building a query string parameter that contains spaces, &, = or other reserved characters.
  • Passing user-entered search terms or free text as part of a link.
  • Constructing an API request URL from dynamic values in code, or debugging one by hand.
  • Sharing a link that embeds another full URL as a parameter (for example a redirect target).

Related tools

Frequently asked questions

Is my text uploaded anywhere?
No. The encoding happens locally in your browser using the standard encodeURIComponent function. Nothing is sent to a server.
What characters does URL encoding change?
Anything outside the small set of URL-safe characters (letters, digits, and - _ . ! ~ * ' ( )) is replaced with a % followed by its hex byte value, so spaces become %20, & becomes %26, and so on.
When do I need to URL encode text?
Whenever a value is going into a URL query string, path segment or form field and might contain reserved characters like spaces, &, =, ? or #, which would otherwise break the URL or be parsed as a separate parameter.
Does this encode the whole URL or just a value?
This encodes a single component — a value you plan to insert into a query string or path segment — not a full URL. Encoding an entire URL the same way would also escape the protocol and slashes, breaking it.
Why does a space become %20 and not a plus sign?
The % 20 form is the standard encodeURIComponent behaviour for a percent-encoded component. The + shorthand for a space is specific to the older application/x-www-form-urlencoded format used in form bodies, not general URL encoding.
Is URL encoding reversible?
Yes, completely. Use the URL Decode tool to turn the percent-encoded string back into the original text with no data loss.