URL encode or decode any text
Percent-encode a query value, a path segment or a whole URL, or turn %XX sequences back into readable text. Handles UTF-8, form-style + spaces and one value per line. Nothing leaves your browser.
How to URL encode or decode text
- Paste the text, value or URL into the input box.
- Choose the encoding type. For a single query value or path segment, keep Component. For a whole address that only needs its spaces and non-ASCII letters fixed, choose Full URL. For data that will be read as an HTML form submission, choose Form.
- Press Encode or Decode. With One value per line ticked, each line is processed separately, so you can convert a whole list of parameters or URLs at once.
- Copy the result, or press Use result as input to run it again, for example to unwrap a value that was encoded twice.
When you decode a complete URL that has a query string, the tool also lists each parameter name and value in plain text, which is the quickest way to read a long tracking or redirect URL.
What percent-encoding is
A URL can only contain a limited set of ASCII characters, and several of those have jobs: ? starts the query, & separates parameters, # starts the fragment, / separates path segments. Percent-encoding is how anything else gets in. Each character is converted to its UTF-8 bytes and each byte is written as % plus two hexadecimal digits. A space is one byte, so it becomes %20; é is two bytes, %C3%A9; an emoji such as 😀 is four, %F0%9F%98%80. Decoding reverses the process.
The rules come from RFC 3986, section 2, the standard that defines URI syntax. It recommends uppercase hex digits (%3A, not %3a), says text should be encoded as UTF-8 bytes first, and warns that implementations must not percent-encode or decode the same string more than once.
Reserved and unreserved characters (RFC 3986)
RFC 3986 splits the characters a URL may contain into two groups:
- Unreserved: letters
A–Z a–z, digits0–9, and- . _ ~. These never need encoding and mean the same thing encoded or not. - Reserved: the general delimiters
: / ? # [ ] @and the sub-delimiters! $ & ' ( ) * + , ; =. These may carry structure, so whenever one is part of your data rather than part of the URL's syntax, it must be percent-encoded.
Everything else, including spaces, % itself, quotes, angle brackets and every non-ASCII character, is not allowed in a URL as-is and always needs encoding. The most common ones:
| Character | Encoded | Why it matters |
|---|---|---|
| space | %20 (or + in form data) | Not allowed in URLs at all |
& | %26 | Would start a new query parameter |
= | %3D | Would split a parameter name from its value |
? | %3F | Would start the query string |
# | %23 | Would cut everything after it into the fragment, which is never sent to the server |
/ | %2F | Would create an extra path segment |
+ | %2B | Read as a space in form-encoded query strings |
% | %25 | Would be read as the start of an escape |
: @ | %3A %40 | Delimit scheme, credentials and host |
é | %C3%A9 | Non-ASCII, encoded as its two UTF-8 bytes |
Component, full URL, RFC 3986 or form: which to use
The same input encodes differently depending on where the result will go. For the input Tom & Jerry's (2024)/ü:
- Component gives
Tom%20%26%20Jerry's%20(2024)%2F%C3%BC. It is JavaScript'sencodeURIComponent, which encodes everything except letters, digits and- _ . ! ~ * ' ( ). Use it for one query value, one path segment, or a URL that you are putting inside another URL's parameter, such as a redirect target. - Strict RFC 3986 gives
Tom%20%26%20Jerry%27s%20%282024%29%2F%C3%BC. It additionally encodes! ' ( ) *, which RFC 3986 reserves as sub-delimiters even thoughencodeURIComponentleaves them alone. Use it when a strict parser or a request-signing scheme expects exactly the RFC set. - Form gives
Tom+%26+Jerry%27s+%282024%29%2F%C3%BC. It follows the WHATWG URL standard's application/x-www-form-urlencoded format: only letters, digits and* - . _are left as they are, and a space becomes+. It is what an HTML form andURLSearchParamssend. - Full URL gives
Tom%20&%20Jerry's%20(2024)/%C3%BC. It isencodeURI, which leaves; / ? : @ & = + $ , #alone because it assumes they are already doing their job in a complete URL. Use it only to tidy a whole address that contains spaces or non-ASCII text. Never use it for a value: an&inside a value would silently start a new parameter.
%20 or +: spaces in URLs
Two conventions exist side by side. In the URL syntax of RFC 3986, a space is always %20, and a + is just a plus sign. In the form-encoding format that browsers use when they submit a form with GET, a space is written as +, and the WHATWG parser for that format replaces every + with a space before percent-decoding. So ?q=a+b means "a b" to a form-data parser, while /a+b in a path means "a+b".
That is why the decoder has a Treat + as a space option. Tick it for query strings produced by forms, search boxes and most analytics tools. Leave it off for paths and for values where a plus is real, such as an email address like name+tag@example.com, which is encoded as name%2Btag%40example.com.
The same thing in code
- JavaScript:
encodeURIComponent()anddecodeURIComponent()for values,encodeURI()for whole URLs, andURLSearchParamsfor form-style query strings with+spaces (see MDN). - Python:
urllib.parse.quote()leaves/unencoded by default and writes spaces as%20, for paths;quote_plus()encodes/and writes spaces as+, for form values (see the Python docs). - PHP:
rawurlencode()follows RFC 3986 and writes spaces as%20;urlencode()writes spaces as+(see the PHP manual).
Common URL encoding problems
Double encoding: %2520 instead of %20
If a URL contains %2520, %253A or similar, something encoded an already-encoded string; %25 is the encoded percent sign. Decode once and check the result. The tool warns you when a decoded result still contains percent sequences, and Use result as input lets you decode the next layer. The fix in code is to encode each value exactly once, at the moment you build the URL.
"Malformed URI sequence" errors
Strict decoders reject a % that is not followed by two hex digits, and byte sequences that are not valid UTF-8. This decoder is lenient instead: it decodes every valid sequence, leaves a stray % as it is, replaces invalid bytes with the � replacement character, and tells you it did, so you can find the broken spot rather than getting nothing.
A value that cuts off at # or &
If a parameter arrives truncated, the value contained an unencoded # or &, usually because the URL was assembled with string concatenation or with Full URL encoding. Encode the value in Component mode.
Encoding a whole URL breaks it
Running a complete URL through Component mode turns https:// into https%3A%2F%2F. That is correct only if the URL is itself a parameter value inside another URL. Otherwise encode just the part you are inserting, or use Full URL mode.
Related URL tools
Build complete campaign links with the UTM builder, strip tracking parameters with the URL cleaner, or see every hop a link takes with the redirect checker. To package a script as a one-click browser bookmark, the bookmarklet maker percent-encodes it for you. And if you are saving reference pages like the RFC while you work, Marqly keeps them in one searchable library, see Marqly for developers.
Frequently asked questions
What does URL encoding do?
It replaces characters that are unsafe or meaningful inside a URL with a percent sign and two hexadecimal digits for each UTF-8 byte. A space becomes %20, & becomes %26, and é becomes %C3%A9. That lets any text travel inside a URL without being mistaken for the URL’s own structure.
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it is the right choice for one query value or path segment. encodeURI also leaves ; / ? : @ & = + $ , # alone, because it assumes you are passing a complete, already-structured URL. Use Component mode for values and Full URL mode only for whole addresses.
Should a space be %20 or +?
Both are correct in different places. %20 works anywhere in a URL. The + sign means a space only in form-encoded query strings (application/x-www-form-urlencoded), which is what HTML forms and URLSearchParams produce. In a path, a + is a literal plus sign. When decoding a query string that came from a form, tick Treat + as a space.
Why does my URL contain %2520?
It was encoded twice. The first pass turned a space into %20; the second pass encoded the % itself as %25, giving %2520. RFC 3986 says the same string must not be encoded or decoded more than once. Decode once to see whether you get %20 back, then decode again.
Can I encode or decode many URLs at once?
Yes. Paste one value per line and keep One value per line ticked. Each line is encoded or decoded separately, so line breaks are preserved instead of becoming %0A.
Which characters need to be encoded?
Anything outside the RFC 3986 unreserved set (letters, digits, hyphen, period, underscore, tilde) must be encoded when it is part of a value rather than part of the URL’s structure. That includes spaces, non-ASCII letters, %, and the reserved delimiters such as ? # & = / : @ and +.
Is my text uploaded?
No. Encoding, decoding and the query-string breakdown all run in your browser with built-in JavaScript functions. Nothing is sent to a server.





