character which invokes an alternative interpretation on subsequent characters in a character sequence
In computing and telecommunications, an escape character is a character (more specifically a metacharacter) that, based on a contextual convention, specifies an alternative interpretation of the sequence of characters that follow it. โ€ฆ Wikipedia
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Escape_character
Escape character - Wikipedia
February 11, 2026 - In computing and telecommunications, an escape character is a character (more specifically a metacharacter) that, based on a contextual convention, specifies an alternative interpretation of the sequence of characters that follow it. The escape character plus the characters that follow it to ...
๐ŸŒ
W3Schools
w3schools.com โ€บ r โ€บ r_strings_esc.asp
R Strings - Escape Characters
An escape character is a backslash \ followed by the character you want to insert.
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Glossary โ€บ Escape_character
Escape character - Glossary - MDN Web Docs
November 6, 2025 - An escape character is a character that causes one or more characters that follow it to be interpreted differently. This forms an escape sequence, which is often used to represent a character that has an alternative meaning when printed literally, such as the quote character in a string literal.
Top answer
1 of 5
223

You can find the full list here.

  • \t Insert a tab in the text at this point.
  • \b Insert a backspace in the text at this point.
  • \n Insert a newline in the text at this point.
  • \r Insert a carriage return in the text at this point.
  • \f Insert a formfeed in the text at this point.
  • \s Insert a space in the text at this point.
  • \' Insert a single quote character in the text at this point.
  • \" Insert a double quote character in the text at this point.
  • \\ Insert a backslash character in the text at this point.
2 of 5
52
Java Escape Sequences:

\u{0000-FFFF}  /* Unicode [Basic Multilingual Plane only, see below] hex value 
                  does not handle unicode values higher than 0xFFFF (65535),
                  the high surrogate has to be separate: \uD852\uDF62
                  Four hex characters only (no variable width) */
\b             /* \u0008: backspace (BS) */
\t             /* \u0009: horizontal tab (HT) */
\n             /* \u000a: linefeed (LF) */
\f             /* \u000c: form feed (FF) */
\r             /* \u000d: carriage return (CR) */
\"             /* \u0022: double quote (") */
\'             /* \u0027: single quote (') */
\\             /* \u005c: backslash (\) */
\{0-377}       /* \u0000 to \u00ff: from octal value 
                  1 to 3 octal digits (variable width) */

The Basic Multilingual Plane is the unicode values from 0x0000 - 0xFFFF (0 - 65535). Additional planes can only be specified in Java by multiple characters: the egyptian heiroglyph A054 (laying down dude) is U+1303F / 𓀿 and would have to be broken into "\uD80C\uDC3F" (UTF-16) for Java strings. Some other languages support higher planes with "\U0001303F".

๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ what is an escape character exactly?
r/learnprogramming on Reddit: what is an escape character exactly?
February 1, 2023 -

Hi, I always read about escaping, but still I don't understand very well what does that means. Can someone explain it to me? I'm a beginner, thank you

Top answer
1 of 2
8
You know how, in most programming languages, you define strings as "Some text here"? The problem with this is that the " character is reserved for starting and ending said string. If you need to use it you need to tell the language that, in this specific case, it should treat it as any other normal character, without the effect it would usually have. That's when you put an escape character defined by that language (usually \) in-front of your ". Similar problem for stuff like new lines. Have you ever tried to get the actual character that indicates a new line? It's impossible to write as it's immediately interpreted and won't show up. Again, escape character to the rescue. This time in front of the n, as it's the first letter of newline. And boom, you now have a newline in your text that you can see and that doesn't break anything for the program
2 of 2
7
Escape characters are special characters that have to be written in a certain way to overcome the limitations of the programming language's syntax. For example, the vast majority of programming languages use double quotes to mark the start and end of a string. Like this: name = "John Doe"; But what if the name has a double quote in it? You can't write this: name = "Dwayne "The Rock" Johnson"; The compiler won't understand it. So you have to write the escape character that corresponds to the the double quote. Something like this: name = "Dwayne \"The Rock\" Johnson"; The compiler will know that the \" is supposed to be part of the string (and translated to just ") and isn't a double quote that's telling it where the string starts and ends.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ gloss_python_escape_characters.asp
Python Escape Characters
An escape character is a backslash \ followed by the character you want to insert.
๐ŸŒ
Reddit
reddit.com โ€บ r/csharp โ€บ character escape sequence "cheat sheet"
r/csharp on Reddit: Character Escape Sequence "cheat sheet"
September 7, 2015 -

Maybe some one is like me and did not know all of these when starting to code recently, just kind of got lost in the mix of never ending things to learn.

Saved this to a notepad++ file and peaked at it as needed until remembered them all by memory. Didn't take long.

Character Escape Sequence name:
\' Single quote
\" Double quote
\\ Backslash
\0 Null
\a Alert
\b Backspace
\f Form feed
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical quote
๐ŸŒ
Splunk
help.splunk.com โ€บ en โ€บ splunk-cloud-platform โ€บ search โ€บ spl2-search-manual โ€บ wildcards-quotes-and-escape-characters โ€บ when-to-escape-characters
When to escape characters | Splunk Enterprise, Splunk Cloud Platform (last updated 2026-01-16T00:24:46.957Z)
January 16, 2026 - When using SPL2, use the backslash character ( \ ) to ignore characters that have special meaning in a search, such as quotation marks, pipes, and the backslash character itself. In some situations, you can avoid using escape characters by using a search literal or raw string literal instead.
Find elsewhere
๐ŸŒ
Alibaba Cloud
alibabacloud.com โ€บ help โ€บ en โ€บ maxcompute โ€บ user-guide โ€บ maxcompute-escape-character-using
Escape characters - MaxCompute - Alibaba Cloud Documentation Center
May 29, 2025 - Escape characters,MaxCompute:In MaxCompute, characters that have special meanings or characters that cannot be directly entered must be escaped. This ensures that strings can be accurately represented and processed. This topic de...
๐ŸŒ
MA Team
mateam.net โ€บ html-escape-characters
HTML Escape Characters: Complete List of HTML Entities
A numeric character reference in hexadecimal format. The hex number is case-insensitive, and all numeric character references begin with &# and conclude with ;. Escapes are very useful for representing characters that are not apparent or are ambiguous.
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ cpp โ€บ c-language โ€บ escape-sequences
Escape Sequences | Microsoft Learn
Character combinations consisting of a backslash (\) followed by a letter or by a combination of digits are called "escape sequences." To represent a newline character, single quotation mark, or certain other characters in a character constant, ...
๐ŸŒ
AutoHotkey
autohotkey.com โ€บ docs โ€บ v1 โ€บ misc โ€บ EscapeChar.htm
Escape Sequences - Definition & Usage | AutoHotkey v1
Escape sequences are used to indicate that specific characters should be interpreted differently than they normally would.
๐ŸŒ
Python Reference
python-reference.readthedocs.io โ€บ en โ€บ latest โ€บ docs โ€บ str โ€บ escapes.html
Escape Characters โ€” Python Reference (The Right Way) 0.1 documentation
For example, the string literal rโ€nโ€ consists of two characters: a backslash and a lowercase โ€˜nโ€™. String quotes can be escaped with a backslash, but the backslash remains in the string; for example, rโ€โ€œโ€ is a valid string literal consisting of two characters: a backslash and a double quote; rโ€โ€ is not a valid string literal (even a raw string cannot end in an odd number of backslashes).
๐ŸŒ
Shell Scripting Tutorial
shellscript.sh โ€บ escape.html
Escaping special characters in the shell - The Shell Scripting Tutorial
Most characters (*, ', etc) are not interpreted (ie, they are taken literally) by means of placing them in double quotes (""). They are taken as is and passed on to the command being called. An example using the asterisk (*) goes: $ echo * case.shtml escape.shtml first.shtml functions.shtml hints.shtml index.shtml ip-primer.txt raid1+0.txt $ echo *txt ip-primer.txt raid1+0.txt $ echo "*" * $ echo "*txt" *txt
๐ŸŒ
OpenText
docs.microfocus.com โ€บ OMi โ€บ 10.62 โ€บ Content โ€บ OMi โ€บ ExtGuide โ€บ ExtApps โ€บ URL_encoding.htm
URL escape codes
If you must escape a character in a string literal, you must use the dollar sign ($) instead of percent (%); for example, use query=title EQ "$3CMy title$3E" instead of query=title EQ '<My title>'.
๐ŸŒ
Polytechnique
lix.polytechnique.fr โ€บ ~liberti โ€บ public โ€บ computing โ€บ prog โ€บ c โ€บ C โ€บ FUNCTIONS โ€บ escape.html
Escape sequences - LIX
The following is a list of escape sequences. \n Newline \t Horizontal Tab \v Vertical Tab \b Backspace \r Carriage Return \f Form feed \a Audible Alert (bell) \\ Backslash \? Question mark \' Single quote \" Double quote \000 Oct - No one uses Octal unless they have an ICL background... \xhh Hex number Decimal table just for fun. \ Preprocessor line continuation, must be immediately followed by a newline. These can be used anywhere that C expects to see a character constant.
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Escape_sequence
Escape sequence - Wikipedia
December 18, 2025 - In computing, an escape sequence is a sequence of characters that has a special semantic meaning based on an established convention that specifies an escape character prefix in addition to the syntax of the rest of the text of a sequence. A convention can define any particular character code as a sequence prefix.