About the String Escape
Every language has its own rules for string literals. JSON requires \", \\ and \n-style escapes and \u00XX for other control characters. JavaScript also escapes ' and backticks and uses \x for control characters plus \u2028/\u2029, which break older engines. Java/C# use \uXXXX; Python uses \xHH and understands \U0010FFFF and octal on unescape.
SQL string literals escape a single quote by doubling it: O'Reilly → O''Reilly. That is handy for scripts and fixtures, but in application code always use parameterised queries instead of building SQL strings. CSV quotes a field that contains a comma, quote, line break or leading/trailing space, and doubles embedded quotes (RFC 4180). Regex escapes the metacharacters . * + ? ^ $ { } ( ) | [ ] \ / so a string matches literally.
Unescaping reports invalid sequences with their position, such as a lone trailing backslash or a \u without four hex digits. Everything runs locally.
How to use it
- Choose Escape or Unescape.
- Select the target language or format.
- Paste the text or literal (without the surrounding quotes).
- Copy the output into your code.