%2B is the URL-encoded plus sign (+).

In a URL, %2B stands for the plus sign (+). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character+
NamePlus sign
UnicodeU+002B
UTF-8 bytes2B (1 byte)
Percent-encoded%2B
Lowercase form%2b — identical meaning
Double-encoded%252B
HTML form encoding%2B
RFC 3986 classReserved — sub-delimiter

What it means in a URL

In a query string the plus sign means “space” under form encoding, so a literal plus must be sent as %2B. In a path, + is just a plus sign. Phone numbers, email aliases (name+tag@…) and Base64 data are where this bites.

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 — a raw + is read as a space
FragmentAllowed raw
Form bodyEncode

The mistake to watch for

Sending ?phone=+44… or ?email=a+b@x.com unencoded — the server decodes the plus as a space.

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)%2Bencoded
JavaScript encodeURI(s)+kept
JavaScript URLSearchParams%2Bencoded
Python urllib.parse.quote(s)%2Bencoded
Python quote(s, safe="")%2Bencoded
Python urllib.parse.quote_plus(s)%2Bencoded
PHP rawurlencode($s)%2Bencoded
PHP urlencode($s)%2Bencoded
Java URLEncoder.encode(s, UTF_8)%2Bencoded
Go url.QueryEscape(s)%2Bencoded
Go url.PathEscape(s)+kept
Ruby URI.encode_www_form_component(s)%2Bencoded
Ruby ERB::Util.url_encode(s)%2Bencoded
C# / .NET Uri.EscapeDataString(s)%2Bencoded

Decoding it

decodeURIComponent('%2B') returns the plus sign (+). Python: urllib.parse.unquote('%2B'); PHP: rawurldecode('%2B'). Paste any string into the URL decoder to decode it in your browser.

← %2A Asterisk  ·  Full URL encoding table  ·  %2C Comma →

Common questions.

%2B is the percent-encoded form of the plus sign (+), whose byte value is 0x2B. Decoding the URL turns it back into the character.

Yes. Hex digits in percent-encoding are case-insensitive, so %2b and %2B 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 %2B, Python’s quote(s, safe="") gives %2B, PHP’s rawurlencode gives %2B.

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.