%23 is the URL-encoded hash (#).
In a URL, %23 stands for the hash (#). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.
Quick facts
| Character | # |
|---|---|
| Name | Hash (number sign) |
| Unicode | U+0023 |
| UTF-8 bytes | 23 (1 byte) |
| Percent-encoded | %23 |
| Lowercase form | %23 — identical meaning |
| Double-encoded | %2523 |
| HTML form encoding | %23 |
| RFC 3986 class | Reserved — general delimiter |
What it means in a URL
The hash starts the fragment: everything after a raw # stays in the browser and is never sent to the server. As data — a colour like #ff0000, a channel name, a C# tag — it must be encoded as %23.
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 appears | What to do |
|---|---|
| Path segment | Encode |
| Query value | Encode — a raw # ends the query |
| Fragment | Encode |
| Form body | Encode |
The mistake to watch for
An unencoded # in a UTM value or search term: the server and your analytics never see anything after it.
What each language produces
Left as-is by JavaScript encodeURI(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).
| Function | Output | |
|---|---|---|
| JavaScript encodeURIComponent(s) | %23 | encoded |
| JavaScript encodeURI(s) | # | kept |
| JavaScript URLSearchParams | %23 | encoded |
| Python urllib.parse.quote(s) | %23 | encoded |
| Python quote(s, safe="") | %23 | encoded |
| Python urllib.parse.quote_plus(s) | %23 | encoded |
| PHP rawurlencode($s) | %23 | encoded |
| PHP urlencode($s) | %23 | encoded |
| Java URLEncoder.encode(s, UTF_8) | %23 | encoded |
| Go url.QueryEscape(s) | %23 | encoded |
| Go url.PathEscape(s) | %23 | encoded |
| Ruby URI.encode_www_form_component(s) | %23 | encoded |
| Ruby ERB::Util.url_encode(s) | %23 | encoded |
| C# / .NET Uri.EscapeDataString(s) | %23 | encoded |
Decoding it
decodeURIComponent('%23') returns the hash (#). Python: urllib.parse.unquote('%23'); PHP: rawurldecode('%23'). Paste any string into the URL decoder to decode it in your browser.
← %22 Double quote · Full URL encoding table · %24 Dollar sign →
Common questions.
%23 is the percent-encoded form of the hash (#), whose byte value is 0x23. Decoding the URL turns it back into the character.
Yes. Hex digits in percent-encoding are case-insensitive, so %23 and %23 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 %23, Python’s quote(s, safe="") gives %23, PHP’s rawurlencode gives %23.
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.