Developer Tools · Web · Free

URL Encoder

Percent-encode URLs, query strings, and arbitrary text for safe use in links, addresses, and HTTP requests. Letters, digits and - . _ ~ pass through untouched; spaces, punctuation, non-ASCII words and emoji all become %XX UTF-8 escapes. Encoding runs entirely in your browser — the text you paste is never sent anywhere or stored.

URL Encoder — percent-encode URLs, URIs and query strings right in this browser tab. Letters, digits and - . _ ~ stay raw while every other character becomes its uppercase-hex UTF-8 escape (%XX). With the option turned on, spaces after the first ? become + for form-style query strings. Text is never sent to a server — encoding runs locally in your browser.

URL encoding example

URL input: https://www.example.com/web/tools/url-encoder.html
Encoded URL output: https%3A%2F%2Fwww.example.com%2Fweb%2Ftools%2Furl-encoder.html

URL encoding table

URL percent-encoding reference table
CharacterPercent Encoding
(space)%20
!%21
"%22
#%23
$%24
%%25
&%26
'%27
(%28
)%29
*%2A
+%2B
,%2C
/%2F
:%3A
;%3B
<%3C
=%3D
>%3E
?%3F
@%40
[%5B
\%5C
]%5D
^%5E
`%60
{%7B
|%7C
}%7D

See also

STEP 1

Paste or drop your text

Type or paste any text into the input — a full URL, a query string, a single word with spaces, or even emoji. Drag-and-drop of plain text works too. Multi-line input is fine; line breaks encode as %0D and %0A.

STEP 2

Press Encode

The encoded result appears in the output box. Switch the Replace spaces with + after ? option when building form-style query strings — then only spaces after the first ? become +, while every other space still becomes %20. Press Reset to clear both boxes and restore the option.

STEP 3

Copy the result

Press Copy result to put the encoded text on your clipboard, ready to paste into a link, an <a href>, a redirect target, or an API request. The output box stays selectable, so you can also copy it by hand.

About URL percent encoding

Which characters get encoded?
Everything except the unreserved set: A–Z, a–z, 0–9 and - . _ ~. Spaces become %20, # becomes %23, ? becomes %3F, & becomes %26, and non-ASCII text is encoded as its UTF-8 bytes — for example 中文 becomes %E4%B8%AD%E6%96%87. Hex letters are uppercase, matching the usual percent-encoding convention.
When do I want spaces as + instead of %20?
In the query part of a URL (after the ?), HTML form encoding traditionally writes spaces as +. Turn the option on and only spaces after the first ? change — spaces before it and literal + characters in your text are untouched (a + in your input always encodes to %2B, so nothing is ambiguous).
What happens to text that is already percent-encoded?
It is encoded again, like any other character: the % sign itself becomes %25, so an existing %20 turns into %2520. If you want the original text back, decode it instead of encoding it a second time.
Why does my link break when it contains another URL?
Characters like ?, &, = and # inside a nested URL are read as separators by the browser. Percent-encode the nested URL first — : becomes %3A and / becomes %2F — and it survives intact as a single query parameter value.

Privacy: encoding runs locally in your browser — your text is never collected, stored, or transmitted. For decoding a percent-encoded URL back to plain text, use a URL decoder tool.

← More Developer Tools