ToolNest

String Escape / Unescape

JSON, JS, regex, SQL, CSV escapingRuns locally · nothing uploaded

Input
Output
Also works as:json escaperegex escapesql escapeescape string

How to use

  1. 1Choose the escape type.
  2. 2Paste the text.
  3. 3Toggle escape/unescape and copy.

FAQ

Which characters does regex escaping cover?

. * + ? ^ $ { } ( ) | [ ] \ — every character with special meaning in a regex.

How are newlines escaped in JSON?

Newline → \n, tab → \t, quote → \", backslash → \\.