String Escaper / Unescaper

Escape and unescape strings for JSON, SQL, HTML/XML, JavaScript, Regex, and CSV
This free online string escaper / unescaper runs in your browser and is part of our Text Tools collection.

String Escaper / Unescaper

Safely escape and unescape strings for JSON, SQL queries, HTML/XML entities, JavaScript, Regular Expressions, CSV, and URLs.

Source Text: 0 chars
Escaped Output (JSON): Ready

Supported Escaping Types

  • JSON: Escapes double quotes (\"), backslashes (\\), and control characters (\n, \t).
  • SQL: Escapes single quotes to prevent syntax errors and injection ('' or \').
  • HTML: Encodes characters like &, <, >, ", and ' into HTML entities.
  • Regex: Safely escapes all special regex characters (. * + ? ^ $ { } ( ) | [ ] \) so text can be used as a literal match.

More Text Tools

Explore related tools in the same category to solve adjacent tasks faster.

Word CounterCount words, characters, and linesCase ConverterConvert text case (upper, lower, title, sentence)Lorem Ipsum GeneratorGenerate placeholder textText Diff CheckerCompare two texts and find differencesDuplicate Line RemoverRemove duplicate lines from text