What is URL?
URL encoding (also called percent-encoding) converts characters that are reserved or unsafe in URLs into a % followed by two hexadecimal digits. For example a space becomes %20 and & becomes %26. Defined by RFC 3986, it lets you safely pass values in query strings, form submissions and API requests without breaking the URL structure. This tool percent-encodes text into a URL-safe form instantly in your browser.
Runs locally: URL encoding happens in your browser; nothing is uploaded. It is a reversible encoding, not encryption.
How URL works
Percent-encoding replaces unsafe bytes with a % and their hexadecimal value:
- The text is converted to bytes (UTF-8).
- Unreserved characters (A–Z, a–z, 0–9 and
- _ . ~) are left as-is. - Every other byte is written as
%followed by its two-digit hex value — for example a space (0x20) becomes%20and&(0x26) becomes%26. - Multibyte characters are encoded byte-by-byte, so
ébecomes%C3%A9.
How to use
- Enter or paste your text in the input box.
- The URL-encoded result appears instantly in the output.
- Click Copy to use the encoded value.
Examples
| Input | URL-encoded |
|---|---|
hello world | hello%20world |
a&b=c | a%26b%3Dc |
café | caf%C3%A9 |
100% | 100%25 |
Options explained
- Component vs full URL — Encode a single value (query parameter) more strictly than a whole URL, where some separators must stay literal.
- Space as + — In application/x-www-form-urlencoded form data, spaces are encoded as + instead of %20.
- Character set — Text is encoded as UTF-8 bytes before percent-encoding.
Common uses
- Building query strings and passing values safely in URLs.
- Submitting HTML form data (application/x-www-form-urlencoded).
- Encoding parameters for REST API requests.
- Including special characters in links without breaking them.
Frequently asked questions
What does URL encoding do?
It replaces reserved or unsafe characters (spaces, &, ?, =, #, and others) with %XX hex codes so the URL stays valid.
Why is a space %20?
Spaces are not allowed in URLs, so they are percent-encoded as %20 (and sometimes as + within query strings).
How do I reverse it?
Use the URL Decode tool to turn percent-encoded text back into the original.
What is the difference between %20 and +?
Both mean a space: %20 is standard percent-encoding; + is used specifically in form-encoded query data.