URL encode a value or an address
A URL accepts only a limited set of characters. The others, spaces, accented letters or symbols, are written as
%XX, where XX is the hexadecimal value of one byte of their UTF-8 encoding:
é becomes %C3%A9, a space %20. Choose Encode, then what you
are encoding:
- A parameter value (
encodeURIComponent): everything is encoded except ASCII letters, digits and- _ . ! ~ * ' ( ). The separators& = / ? #and the+therefore become ordinary data. This is the right choice for text placed after?q=or in a path segment. - A full address (
encodeURI): the separators: / ? # & =stay in place and only forbidden characters are encoded. This is the right choice to make a full, hand-written address valid.
Value café & tea
Result caf%C3%A9%20%26%20tea
Address https://example.com/search?q=naïve café&page=2
Result https://example.com/search?q=na%C3%AFve%20caf%C3%A9&page=2
The choice matters: encoded as a full address, the value “café & tea” would keep its &, and the
server would split it into two parameters.
URL decode a string
In Decode mode, paste an address or a value full of %XX: the URL decoder restores the
readable text, encoded separators included (%2F, %26…).
The Read “+” as a space option is for form data. An HTML form submitted as
application/x-www-form-urlencoded writes a space as +, as in
q=caf%C3%A9+cr%C3%A8me; so do URLSearchParams, PHP's urlencode and Python's
urllib.parse.urlencode. Tick it for such strings; elsewhere, + stays a plus sign.
The “Invalid %XX sequence” message flags a % not followed by two hexadecimal digits,
as in 100%, or bytes that do not form a UTF-8 character, such as a lone %E9, the “é” of an
old Latin-1 encoding. The text was then truncated, or encoded in another character set.
The Use the result as input button takes the result and switches direction: a
%2520, the sign of double encoding, decodes in two steps this way.
Addresses are kept
Encoding makes an address valid, not confidential: %XX is as easy to read back as Base64. And a URL ends
up in browser history, in server and proxy logs, and in the Referer header. If decoding reveals a
password or a token, as in https://alice:password@example.com/ or ?token=…, hand it over
separately: the calculation runs in your browser, and “Send with onlyU” passes the
result to onlyU from one tab to another, never in an address and never through the kit's server. onlyU encrypts it
in your browser and creates a link that opens only once, valid for 24 hours, then disappears. To share the address
itself, the secret redaction tool replaces the password it contains.
To understand the encoding rules and the mistakes that break links, read our guide URL encoding explained.