String Escaper
Escape/unescape for JSON, HTML, URLs, regex and CSV.
""
โ ๏ธ Unexpected end of JSON input
Escape turns special characters into safe representations; unescape reverses them. Paste escaped text to get it unescaped below.
About the String Escaper
Escape and unescape text for five contexts: JSON and JavaScript strings, HTML, URLs, regular expressions and CSV. Type once and both the escaped and unescaped versions appear, so you can either harden a string for embedding or paste escaped input to recover the original characters.
How to use the String Escaper
- Click a tab to choose the context: JSON / JS, HTML, URL, Regex or CSV.
- Paste your text into the editor.
- Copy the Escaped output when embedding the text in code or markup.
- Paste escaped text instead to get the Unescaped original below.
String Escaper FAQ
What does each mode escape?
JSON wraps the text in quotes and escapes quotes, backslashes and control characters; HTML converts & < > and quotes to entities; URL percent-encodes; regex backslashes metacharacters; CSV wraps the value in quotes only when it contains a quote, comma or newline.
Why does unescaping fail?
Invalid escapes such as malformed JSON or broken percent sequences produce a warning with the parser error rather than a silently wrong result.
Does the URL mode turn plus signs into spaces?
When unescaping, plus characters are treated as spaces, matching how HTML form data is encoded; escaping always uses standard percent-encoding.