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 ...
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Glossary โ€บ Escape_character
Escape character - Glossary - MDN Web Docs
November 6, 2025 - In JavaScript regexes, string literals, and identifiers, we can use the backslash (\) to escape characters like \', \", \u0026, etc.
๐ŸŒ
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. An example of an illegal character is a double quote inside a string that is surrounded by double quotes: str <- "We are the so-called "Vikings", from the north." ...
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
W3C
w3.org โ€บ International โ€บ questions โ€บ qa-escapes
Using character escapes in markup and CSS
August 12, 2010 - If there is a following character that is not in the range Aโ€“F, aโ€“f or 0โ€“9, that is all you need. The following example represents the word รฉmotion. ... There is no actual need to escape the รฉ in these examples. It's just for the purposes of illustration.
๐ŸŒ
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, ...
Find elsewhere
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 / &#77887; and would have to be broken into "\uD80C\uDC3F" (UTF-16) for Java strings. Some other languages support higher planes with "\U0001303F".

๐ŸŒ
Cambridge Dictionary
dictionary.cambridge.org โ€บ us โ€บ dictionary โ€บ english โ€บ escape-character
Meaning of escape character in English - Cambridge Dictionary
a symbol that is used in coding (= writing instructions for a computer) before a character (= letter, number, etc.) or string (= series of characters), to tell the computer that the character or string should be understood in a different way from normal: Backslash should be avoided outside of quoted strings because it is the escape character for MySQL.
๐ŸŒ
Understandingcode
understandingcode.com โ€บ escape-characters
Escape Characters | Understanding Code
Some characters are used to display HTML tags, like the < and >. If you want to have these characters displayed in the browser, and not interpreted as HTML, then you need to use a special code. These codes are known as escape characters.
๐ŸŒ
Unicode Compart
compart.com โ€บ en โ€บ unicode โ€บ U+241B
โ€œโ›โ€ U+241B Symbol For Escape Unicode Character
U+241B is the unicode hex value of the character Symbol For Escape. Char U+241B, Encodings, HTML Entitys:โ›,โ›, UTF-8 (hex), UTF-16 (hex), UTF-32 (hex)
๐ŸŒ
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.
๐ŸŒ
Quora
quora.com โ€บ Why-escape-characters-such-as-n-t-etc-are-called-escape-characters-in-programming-languages-such-as-C-C-Java-Python-etc-What-is-the-connection-between-them-and-escaping-which-these-characters-are-called-escape
Why escape characters (such as \n, \t, \\, etc.) are called 'escape' characters in programming languages โ€‹โ€‹ (such as C/C ++, Java, Python, etc.)? What is the connection between them and escaping, which these characters are called 'escape' characters? - Quora
Again, the sequence is called an escape sequence because it escapes from the โ€œnormalโ€ interpretation of characters in a string. ... Programming since VIC-20 with BASIC and 6502 assembly ยท Author has 69.1K answers and 41.3M answer views ยท 4y ยท The characters are prefixed by another symbol that changes their meaning, this is the escape sequence.
๐ŸŒ
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>'.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ c language โ€บ escape-sequence-in-c
Escape Sequence in C - GeeksforGeeks
They start with a backslash \ followed by a character (e.g., \n, \t). Different escape sequences represent different characters but the output is dependent on the compiler you are using.
Published ย  November 1, 2025
๐ŸŒ
AutoHotkey
autohotkey.com โ€บ docs โ€บ v1 โ€บ misc โ€บ EscapeChar.htm
Escape Sequences - Definition & Usage | AutoHotkey v1
The escape character ` (back-tick or grave accent) is used to indicate that the character immediately following it should be interpreted differently than it normally would.
๐ŸŒ
IBM
ibm.com โ€บ docs โ€บ en โ€บ imdm โ€บ 11.6.0
Escape characters
March 14, 2024 - Some characters in content integration server queries have special meanings.