An escape sequence is a sequence of characters used to represent special characters within string literals. The characters in an escape sequence do not represent themselves when used inside the string literal, but instead translate into another character or sequence of characters that can be difficult to represent on its own.

In a string literal, an escape sequence is identified by a backslash (\) that is followed by a letter or other character.