\uXXXX sequences.Escape \n \t \r \\ \" \b \f \/ and \uXXXX sequences for control characters
How it works
Escaping turns a text's special characters —line breaks, tabs, quotes, and the backslash itself— into backslash sequences (\n, \t, \", \\) so that text can be inserted inside a code string without breaking its syntax.
Each language has different rules: JSON, C/Java/JS, Python, SQL, Regex, and Shell escape different sets of characters. Choose the style of the destination where you will paste the text.
Unescaping does the reverse: it interprets the \n, \t, \uXXXX, and similar sequences, and returns the original text.
Examples
C:\Users\anaC:\\Users\\anaIn JSON and C/Java/JS each backslash is doubled so it is not confused with the start of an escape sequence.O'BrienO''BrienIn SQL the single quote is doubled (ANSI standard) so it can be included inside a literal.precio (USD)precio \(USD\)In Regex, metacharacters such as ( ) are escaped to treat them as literal text and not as grouping.Use cases
- Paste a Windows path, a JSON, or an HTML fragment inside a code string without breaking it.
- Prepare a value for a SQL query, avoiding syntax errors caused by quotes.
- Turn literal text into a regular expression pattern by escaping its metacharacters.
- Recover the original text of an escaped string copied from a log or the source code.
Frequently asked questions
What is the difference between the escape styles?
Each language recognizes different sequences: JSON does not accept \' or \0, C and Python do; SQL doubles quotes instead of using a backslash; Regex escapes metacharacters; and Shell escapes spaces and interpreter symbols. That is why it is best to choose the destination's style.
What does the "Escape non-ASCII" option do?
It converts Unicode characters (accents, emojis) into \uXXXX sequences —or \xNN in Python and C— so the text is safe in destinations that only accept ASCII.
Does escaping quotes protect against SQL injection?
It helps, but it does not replace parameterized queries. For untrusted data always use parameters or prepared statements; escaping is only a complementary defense.
Is my text sent to a server?
No. Escaping and unescaping happen entirely in your browser.