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.

Encoding happens entirely in this browser tab — your text is never sent anywhere or stored. Letters, digits and - . _ ~ stay as they are and every other character becomes its %XX UTF-8 escape (uppercase hex). With the ‘+’ option on, spaces after the first ‘?’ encode as ‘+’ (form-style query strings); every other space becomes %20. Already-encoded text is encoded again (%20 → %2520).

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