%0D is the URL-encoded carriage return.

In a URL, %0D stands for the carriage return. Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

CharacterCR (invisible)
NameCarriage return (CR)
UnicodeU+000D
UTF-8 bytes0D (1 byte)
Percent-encoded%0D
Lowercase form%0d — identical meaning
Double-encoded%250D
HTML form encoding%0D
RFC 3986 classNot allowed in URLs

What it means in a URL

A carriage return is a control character, encoded as %0D. Windows line endings send it together with a line feed as %0D%0A, which is also how HTML forms encode a line break.

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 appearsWhat to do
Path segmentEncode
Query valueEncode
FragmentEncode
Form bodyEncode

The mistake to watch for

Header injection through %0D%0A — the classic HTTP response-splitting payload.

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

Decoding it

decodeURIComponent('%0D') returns the carriage return. Python: urllib.parse.unquote('%0D'); PHP: rawurldecode('%0D'). Paste any string into the URL decoder to decode it in your browser.

← %0A Line feed (newline, LF)  ·  Full URL encoding table  ·  %09 Tab →

Common questions.

%0D is the percent-encoded form of the carriage return, whose byte value is 0x0D. Decoding the URL turns it back into the character.

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

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.