%0A is the URL-encoded line feed.

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

Quick facts

CharacterLF (invisible)
NameLine feed (newline, LF)
UnicodeU+000A
UTF-8 bytes0A (1 byte)
Percent-encoded%0A
Lowercase form%0a — identical meaning
Double-encoded%250A
HTML form encoding%0A
RFC 3986 classNot allowed in URLs

What it means in a URL

A line feed is a control character, encoded as %0A. It appears legitimately in multi-line form fields; anywhere else it is a warning sign.

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

CRLF injection: %0D%0A in a value that is copied into an HTTP header lets an attacker add headers. Strip or reject control characters after decoding.

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

Decoding it

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

← %7E Tilde  ·  Full URL encoding table  ·  %0D Carriage return (CR) →

Common questions.

%0A is the percent-encoded form of the line feed, whose byte value is 0x0A. Decoding the URL turns it back into the character.

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

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.