%26 in a URL
The percent-encoded ampersand (&).
Short answer
%26 is the percent-encoded ampersand (&). In a query string, & separates one parameter from the next, so an ampersand that belongs to a value, such as Tom & Jerry, must be written as %26 or the value is cut short.
- Character
- &
- Percent-encoded
- %26
- Byte value
- 0x26 = 38
- RFC 3986 class
- sub-delim
- UTF-8 bytes
- 1
Where you will see it
- Names containing ampersands in search terms: q=AT%26T.
- A query string nested inside a value: next=%2Fsearch%3Fa%3D1%26b%3D2.
- Output of encodeURIComponent; encodeURI leaves & alone.
What goes wrong
- Using encodeURI on a parameter value leaves & untouched, so the server sees the value end at the ampersand. Use encodeURIComponent for values.
- In HTML source, a literal ampersand is written &. That is an HTML entity, not percent-encoding: the HTML parser turns & into & before the browser reads the URL. Use the HTML encoder for entities.
Decoded examples
| Encoded | Decodes to | What it is | Open in the decoder |
|---|---|---|---|
| q=AT%26T | q=AT&T | A search for AT&T. | Open in decoder |
| next=%2Fsearch%3Fa%3D1%26b%3D2 | next=/search?a=1&b=2 | A URL with its own query string, nested in a parameter. | Open in decoder |
How each language encodes &
Outputs below come from running each function, not from documentation. “Kept” means the function leaves the character as it is. Compare every character across every function.
| Language | Function | Output for & |
|---|---|---|
| JavaScript | encodeURIComponent | %26 |
| JavaScript | encodeURI | kept |
| JavaScript | URLSearchParams | %26 |
| JavaScript | escape (deprecated) | %26 |
| Python | quote (default safe='/') | %26 |
| Python | quote (safe='') | %26 |
| Python | quote_plus | %26 |
| C# | Uri.EscapeDataString | %26 |
| C# | WebUtility.UrlEncode | %26 |
| C# | HttpUtility.UrlEncode | %26 |
Questions
How do I put an ampersand in a URL parameter?
Encode it as %26. With JavaScript, encodeURIComponent('Tom & Jerry') returns Tom%20%26%20Jerry. Building the URL with URLSearchParams does it for you.
Is %26 the same as &?
No. %26 is percent-encoding for URLs. & is an HTML entity for the ampersand in HTML text and attributes. They solve different problems and are decoded by different parsers.
Decode or encode your own text
Paste anything containing %26. It runs in your browser; nothing is uploaded.
Related characters
%3D
equals sign
%3D is the percent-encoded equals sign (=).
%3F
question mark
%3F is the percent-encoded question mark (?).
%23
hash sign
%23 is the percent-encoded hash sign (#).
All percent-encoded characters · Full percent-encoding table · What is URL encoding?
Behaviour checked against RFC 3986, the WHATWG URL Standard and MDN. Updated November 4, 2026
Tools
URL Encoder
Percent-encode a value, a full URL or form data, with strict RFC 3986 and +/%20 options.
URL Parser
Split a URL into scheme, host, port, path, query and fragment, with checks for common problems.
Query String Parser
Edit query parameters as a table, rebuild the string, or export it as JSON.
Base64 Encode/Decode
Convert text to Base64 and back, including the URL-safe Base64URL alphabet.
HTML Encode/Decode
Escape text to HTML entities and decode entities back to text.
JWT Decoder
Read a JSON Web Token's header and payload and check its expiry.