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-encoded
Component mode escapes everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ). Use it for a single query value.

Tip: URL encoding is not encryption. It only ensures special characters don't break the URL structure.

Result

Waiting for input
Percent-encoded
—

What 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.

ModeEquivalent toPreservesUse for
ComponentencodeURIComponent()Only A–Z a–z 0–9 - _ . ! ~ * ' ( )A single value — a query parameter, a form field, a filename.
Full URLencodeURI()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.

Frequently asked questions

URL encoding (also called percent-encoding) replaces characters that are unsafe or have special meaning in URLs with a percent sign followed by two hexadecimal digits. For example, a space becomes %20, an ampersand becomes %26, and the emoji 🌍 becomes %F0%9F%8C%8D. This ensures the URL is transmitted correctly and not misinterpreted by servers, browsers, or intermediaries.
encodeURIComponent escapes every character that isn't an unreserved character (A–Z, a–z, 0–9, -, _, ., !, ~, *, ', (, )). It is designed for encoding a single value, like a query parameter. encodeURI preserves the characters that give a URL its structure — :/?#[]@!$&'()*+,;= — so it can safely encode a complete URL without breaking it. In short: use encodeURIComponent for query values, encodeURI for full URLs.
The most common cause is a broken percent-escape — for example, a lone % that isn't followed by two hex digits, or a byte sequence that isn't valid UTF-8. This decoder validates every escape before decoding and reports exactly which escape is malformed instead of producing garbled output.
Yes. Both encodeURIComponent and encodeURI are UTF-8 based, so they correctly encode emojis, accented letters, and non-Latin scripts such as Hindi, Chinese, Arabic, and Cyrillic. An emoji like 🌍 becomes a four-byte UTF-8 sequence that is percent-encoded as %F0%9F%8C%8D.
In the query string portion of a URL (after the ? character), '+' is conventionally treated as a space. This comes from the HTML form encoding rules. Outside the query string, '+' is a literal character. This tool has an option to decode '+' as a space, which matches how browsers and servers handle form submissions.
URL encoding is not a security measure — it's a data-transport encoding. It ensures that special characters don't break the URL structure, but it doesn't protect against SQL injection, XSS, or any other attack. Use proper input validation and parameterised queries for security.
Yes, completely free. No signup, no watermark, no hidden charges. Encode and decode as much as you want for personal or commercial use.
Absolutely. Everything runs in your browser. The text you enter never leaves your device — there is no server processing, no logging, and no data storage.