Escape / Unescape

Escape special characters for HTML, JavaScript/JSON, or regex - and reverse it

0 chars ยท 0 lines
0 chars

Escaping flavors

HTML/XML Entities

Converts &, <, >, " and ' to named entities so markup can be displayed as text.

JavaScript/JSON String

Escapes quotes, backslashes and control characters (\n, \t, \u00e9) so text is safe inside string literals.

Regex

Backslash-escapes regular expression metacharacters like .^$*+?()[]{}| so they match literally inside patterns.