%7B is the URL-encoded left curly brace ({).
In a URL, %7B stands for the left curly brace ({). 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 | Left curly brace |
| Unicode | U+007B |
| UTF-8 bytes | 7B (1 byte) |
| Percent-encoded | %7B |
| Lowercase form | %7b — identical meaning |
| Double-encoded | %257B |
| HTML form encoding | %7B |
| RFC 3986 class | Not allowed in URLs |
What it means in a URL
Not allowed raw; encoded as %7B. Curly braces appear in JSON passed as a parameter and in URI templates (/users/{id}, RFC 6570) — a template placeholder must be filled in before the URL is used.
RFC 3986 class: Not allowed in URLs. It is outside the characters RFC 3986 permits, so it must always be percent-encoded.
When to encode it
| Where it appears | What to do |
|---|---|
| Path segment | Encode |
| Query value | Encode |
| Fragment | Encode |
| Form body | Encode |
The mistake to watch for
Sending an unexpanded template such as /users/{id} to a server, or JSON in a query string without encoding it.
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).
| Function | Output | |
|---|---|---|
| JavaScript encodeURIComponent(s) | %7B | encoded |
| JavaScript encodeURI(s) | %7B | encoded |
| JavaScript URLSearchParams | %7B | encoded |
| Python urllib.parse.quote(s) | %7B | encoded |
| Python quote(s, safe="") | %7B | encoded |
| Python urllib.parse.quote_plus(s) | %7B | encoded |
| PHP rawurlencode($s) | %7B | encoded |
| PHP urlencode($s) | %7B | encoded |
| Java URLEncoder.encode(s, UTF_8) | %7B | encoded |
| Go url.QueryEscape(s) | %7B | encoded |
| Go url.PathEscape(s) | %7B | encoded |
| Ruby URI.encode_www_form_component(s) | %7B | encoded |
| Ruby ERB::Util.url_encode(s) | %7B | encoded |
| C# / .NET Uri.EscapeDataString(s) | %7B | encoded |
Decoding it
decodeURIComponent('%7B') returns the left curly brace ({). Python: urllib.parse.unquote('%7B'); PHP: rawurldecode('%7B'). Paste any string into the URL decoder to decode it in your browser.
← %60 Backtick (grave accent) · Full URL encoding table · %7C Vertical bar (pipe) →
Common questions.
%7B is the percent-encoded form of the left curly brace ({), whose byte value is 0x7B. Decoding the URL turns it back into the character.
Yes. Hex digits in percent-encoding are case-insensitive, so %7b and %7B 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 %7B, Python’s quote(s, safe="") gives %7B, PHP’s rawurlencode gives %7B.
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.