HTML Encode Convert HTML entities Slug Generator Convert text to URL slug Find & Replace Search & replace in bulk
Mode
Common encoded chars
%20 — space
%26 — &
%3D — =
%3F — ?
%2F — /
%3A — :
%40 — @
%23 — #
How It Works
  1. 1Choose Encode or Decode mode in the left panel.
  2. 2Paste your text or URL into the Input box.
  3. 3The result appears instantly in the right box.
  4. 4Use ⇅ Swap to flip input/output, then copy.

What is URL Encoding?

URL encoding — also called percent-encoding — is the method defined in RFC 3986 for representing characters that aren't allowed, or that carry special meaning, inside a URL. Each such character is replaced by a percent sign (%) followed by two hex digits for its byte value: a space becomes %20, an ampersand %26, a hash %23. Since a URL may only contain a limited set of ASCII characters, anything outside it — spaces, reserved punctuation, accented letters, CJK characters, emoji — has to be encoded first, or browsers and servers will misread the path or break the query string.

How to Use This URL Encoder & Decoder — Step by Step

  1. Choose your mode: Click the Encode tab to convert plain text or a raw URL into a percent-encoded string, or Decode to turn a percent-encoded URL back into readable text.
  2. Paste your input: Type or paste into the left box. The result appears on the right instantly — no button click needed.
  3. Copy the result: Click Copy result to put the output on your clipboard.
  4. Swap directions: Use Swap to move the output back into the input field — handy for re-encoding or chaining operations.
  5. Clear and start over: Hit Clear to reset both fields.

URL Encoding Examples

The most common characters that require encoding, with their percent-encoded equivalents and where each one matters.

OriginalEncodedNotes
hello worldhello%20worldSpace → %20 (universal, not +)
&%26Ampersand — separates query params; must be encoded inside a value
=%3DEquals sign — key=value separator in query strings
#%23Hash — marks a fragment; browsers stop sending everything after it to the server
?%3FQuestion mark — starts the query string; encode it when it appears in a value
@%40At sign — used in email addresses and authentication URIs
+%2BPlus — a literal plus must be encoded, since a bare + can be read as a space in query strings
ą ę ó (Polish)%C4%85 %C4%99 %C3%B3Multi-byte UTF-8 characters each encode to two or more percent pairs
😀 (emoji)%F0%9F%98%804-byte UTF-8 character → four percent-encoded pairs
https://example.com/search?q=hello world&lang=plhttps%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3DplEncoding a whole URL to nest it as one parameter value — note : and / get encoded too

Related Tools

Frequently Asked Questions

encodeURIComponent vs encodeURI — which should I use?

Use encodeURIComponent for a single piece of a URL — one query-parameter value, one path segment. It encodes everything except the unreserved set A–Z a–z 0–9 - _ . ! ~ * ' ( ), including / : ? # & =. Use encodeURI only on a complete, already-structured URL: it deliberately leaves / : ? # @ & = intact so it won't break the URL's own syntax. The practical rule: building a URL from parts → encodeURIComponent on each value; passing a full URL through untouched → encodeURI. This tool uses encodeURIComponent.

Which characters actually get encoded?

With encodeURIComponent, everything is encoded except the 11 unreserved characters A–Z a–z 0–9 - _ . ! ~ * ' ( ). That means reserved/structural characters (/ : ? # [ ] @ ! $ & ' ( ) * + , ; = — minus the few unreserved overlaps) are turned into %XX. Anything above ASCII 127 is first converted to its UTF-8 bytes, and each byte becomes its own percent pair, so a single accented or CJK character can expand to several %XX groups.

%20 or + for a space — which is correct?

%20 is valid in every part of a URL and is the safe default everywhere. The + shorthand for a space is only defined inside the application/x-www-form-urlencoded body and query strings — not in the path. Because of that ambiguity, a literal plus sign in a value must itself be encoded as %2B, or a decoder may turn it back into a space. When constructing URLs by hand or calling an API, stick to %20.

When do I need to encode a query parameter?

Encode a query value whenever it might contain a character that has structural meaning in the query string — &, =, ?, #, +, a space, or any non-ASCII character. For example ?q=cats & dogs breaks at the &, because the parser reads dogs as a second parameter; encoded as ?q=cats%20%26%20dogs it stays a single value. Encode the value only — not the = joining key to value, and not the & separating one pair from the next.