URL Encoder – Percent-Encode Text & Full URLs
Convert text or URLs into percent-encoded form for safe use in links, query strings, and API requests. Choose component mode for individual values or full-URL mode to preserve the URL structure. Free, private, and runs entirely in your browser.
Input
Text → Percent-encodedA–Z a–z 0–9 - _ . ! ~ * ' ( ). Use it for a single query value.Result
Waiting for inputWhat is URL encoding?
URL encoding — also called percent-encoding — replaces characters that are unsafe or have special meaning inside a URL with a percent sign followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, a question mark becomes %3F, and the emoji 🌍 becomes the four-byte UTF-8 sequence %F0%9F%8C%8D. This guarantees the URL is transmitted intact and isn't misinterpreted by browsers, servers, or proxies along the way.
The rules are defined in RFC 3986, which divides URL characters into unreserved, reserved, and everything else. Unreserved characters — A–Z, a–z, 0–9, and - _ . ~ — never need encoding. Reserved characters like : / ? # [ ] @ ! $ & ' ( ) * + , ; = may need encoding depending on context, because they have structural meaning in a URL.
Everything runs locally in your browser. The text you enter never leaves your device, there's no signup, and there are no usage limits.
Component vs Full URL mode
The two encoding modes exist because the same character can mean two different things depending on whether it's part of the URL structure or part of a value being carried inside the URL. This tool exposes both, matching the standard JavaScript functions encodeURIComponent and encodeURI.
| Mode | Equivalent to | Preserves | Use for |
|---|---|---|---|
| Component | encodeURIComponent() | Only A–Z a–z 0–9 - _ . ! ~ * ' ( ) | A single value — a query parameter, a form field, a filename. |
| Full URL | encodeURI() | Also : / ? # [ ] @ ! $ & ' ( ) * + , ; = | A complete URL where the structural characters must survive. |
Concretely, encoding https://example.com/?q=hello world in Component mode produces https%3A%2F%2Fexample.com%2F%3Fq%3Dhello%20world — the slashes and question mark are escaped, so the string is no longer a functioning URL, just a value. In Full URL mode it produces https://example.com/?q=hello%20world — the URL structure is preserved and only the unsafe space is encoded.
The + character and query strings
In the query string portion of a URL (everything after ?), the + character is conventionally treated as a space. This comes from the HTML form encoding rules defined in application/x-www-form-urlencoded: a form submission replaces spaces with + before sending them. Servers that parse query strings this way expect the same on the way in.
Outside the query string, and in modern APIs that use strict RFC 3986 encoding, + is a literal plus sign and spaces are always %20. This tool has a toggle to decode + as a space, which is the correct behaviour for form-submitted query strings but wrong for URLs that deliberately contain a literal plus. Enable the toggle when you know the input came from a form.