String Escaper (JS/JSON/Regex/Shell)
Escape strings for JS quotes, JSON, Python, regex, and shell online. Paste raw text, get paste-ready literals.
String escaper → JS double-quote
Output
"Say \"hi\"\nC:\\path\\file.txt"
How to use
- Paste raw text.
- Pick target (JS quotes, JSON, Python, regex, shell).
- Copy the paste-ready literal.
FAQ
Which JS quote?
Both offered — pick the one your codebase uses; newlines become \n either way.
Shell safe?
Single-quote wrapping with '\'' escaping — the POSIX-safe pattern.