%5D is the URL-encoded right square bracket (]).

In a URL, %5D stands for the right square bracket (]). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character]
NameRight square bracket
UnicodeU+005D
UTF-8 bytes5D (1 byte)
Percent-encoded%5D
Lowercase form%5d — identical meaning
Double-encoded%255D
HTML form encoding%5D
RFC 3986 classReserved — general delimiter

What it means in a URL

The closing bracket follows the same rules as [: reserved for IPv6 hosts, encoded as %5D anywhere else.

RFC 3986 class: Reserved — general delimiter. It marks the structure of a URL (scheme, authority, path, query, fragment), so as data it must be encoded.

When to encode it

Where it appearsWhat to do
Path segmentEncode
Query valueEncode
FragmentEncode
Form bodyEncode

The mistake to watch for

A Markdown or wiki link that ends at a raw ] inside the URL.

What each language produces

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

Decoding it

decodeURIComponent('%5D') returns the right square bracket (]). Python: urllib.parse.unquote('%5D'); PHP: rawurldecode('%5D'). Paste any string into the URL decoder to decode it in your browser.

← %5C Backslash  ·  Full URL encoding table  ·  %5E Caret →

Common questions.

%5D is the percent-encoded form of the right square bracket (]), whose byte value is 0x5D. Decoding the URL turns it back into the character.

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

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.