%00 is the URL-encoded null byte.
In a URL, %00 stands for the null byte. Here is when to encode it, what it does in each part of a URL, and what every major language outputs.
Quick facts
| Character | NUL (invisible) |
|---|---|
| Name | Null byte |
| Unicode | U+0000 |
| UTF-8 bytes | 00 (1 byte) |
| Percent-encoded | %00 |
| Lowercase form | %00 — identical meaning |
| Double-encoded | %2500 |
| HTML form encoding | %00 |
| RFC 3986 class | Not allowed in URLs |
What it means in a URL
The null byte (%00) has no legitimate use in a URL. Some older languages and C libraries treat it as the end of a string, so file.php%00.jpg was a classic way to bypass extension checks.
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
Passing decoded input with a null byte to file-system or C-based APIs. Reject %00 outright.
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) | %00 | encoded |
| JavaScript encodeURI(s) | %00 | encoded |
| JavaScript URLSearchParams | %00 | encoded |
| Python urllib.parse.quote(s) | %00 | encoded |
| Python quote(s, safe="") | %00 | encoded |
| Python urllib.parse.quote_plus(s) | %00 | encoded |
| PHP rawurlencode($s) | %00 | encoded |
| PHP urlencode($s) | %00 | encoded |
| Java URLEncoder.encode(s, UTF_8) | %00 | encoded |
| Go url.QueryEscape(s) | %00 | encoded |
| Go url.PathEscape(s) | %00 | encoded |
| Ruby URI.encode_www_form_component(s) | %00 | encoded |
| Ruby ERB::Util.url_encode(s) | %00 | encoded |
| C# / .NET Uri.EscapeDataString(s) | %00 | encoded |
Decoding it
decodeURIComponent('%00') returns the null byte. Python: urllib.parse.unquote('%00'); PHP: rawurldecode('%00'). Paste any string into the URL decoder to decode it in your browser.
← %09 Tab · Full URL encoding table · %C2%A0 Non-breaking space →
Common questions.
%00 is the percent-encoded form of the null byte, whose byte value is 0x00. Decoding the URL turns it back into the character.
Yes. Hex digits in percent-encoding are case-insensitive, so %00 and %00 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 %00, Python’s quote(s, safe="") gives %00, PHP’s rawurlencode gives %00.
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.