%26 is the URL-encoded ampersand (&).

In a URL, %26 stands for the ampersand (&). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character&
NameAmpersand
UnicodeU+0026
UTF-8 bytes26 (1 byte)
Percent-encoded%26
Lowercase form%26 — identical meaning
Double-encoded%2526
HTML form encoding%26
RFC 3986 classReserved — sub-delimiter
HTML entity&

What it means in a URL

The ampersand separates query parameters, so a=1&b=2 is two parameters. A literal & inside a value — “Tom & Jerry”, “R&D” — must be encoded as %26 or the value is cut off there.

RFC 3986 class: Reserved — sub-delimiter. RFC 3986 allows it raw in paths and queries, but some schemes and servers give it meaning, so encoding it as data is the safe choice.

When to encode it

Where it appearsWhat to do
Path segmentAllowed raw (encoding is also fine)
Query valueEncode — it separates parameters
FragmentAllowed raw
Form bodyEncode

The mistake to watch for

Forgetting to encode it in a value, so q=Tom&Jerry arrives as q=Tom plus a stray parameter Jerry. (In HTML source the separator itself is also written &.)

What each language produces

Left as-is by JavaScript encodeURI(s), Go url.PathEscape(s); every other function in the table encodes it. Output for the single character, UTF-8 input, tested against the real runtimes (see the encoding comparator for your own strings).

FunctionOutput
JavaScript encodeURIComponent(s)%26encoded
JavaScript encodeURI(s)&kept
JavaScript URLSearchParams%26encoded
Python urllib.parse.quote(s)%26encoded
Python quote(s, safe="")%26encoded
Python urllib.parse.quote_plus(s)%26encoded
PHP rawurlencode($s)%26encoded
PHP urlencode($s)%26encoded
Java URLEncoder.encode(s, UTF_8)%26encoded
Go url.QueryEscape(s)%26encoded
Go url.PathEscape(s)&kept
Ruby URI.encode_www_form_component(s)%26encoded
Ruby ERB::Util.url_encode(s)%26encoded
C# / .NET Uri.EscapeDataString(s)%26encoded

Decoding it

decodeURIComponent('%26') returns the ampersand (&). Python: urllib.parse.unquote('%26'); PHP: rawurldecode('%26'). Paste any string into the URL decoder to decode it in your browser.

← %25 Percent sign  ·  Full URL encoding table  ·  %27 Apostrophe (single quote) →

Common questions.

%26 is the percent-encoded form of the ampersand (&), whose byte value is 0x26. Decoding the URL turns it back into the character.

Yes. Hex digits in percent-encoding are case-insensitive, so %26 and %26 mean the same thing. RFC 3986 recommends uppercase, and mixing cases can make caches and analytics count one URL as two.

Use your language’s encoder on the value: encodeURIComponent in JavaScript gives %26, Python’s quote(s, safe="") gives %26, PHP’s rawurlencode gives %26.

More from the toolkit.

About this page. Written and maintained by Sri Murugan Systems, the developer of urlencodedecode.com. Character classes follow RFC 3986 §2; language outputs were generated by running each function in its real runtime.