Encode & decode
String escape
Escape strings for JSON, JS, SQL and regex
How to use / Notes
How to use
- Enter the string to escape.
- Pick the target context (JSON, JavaScript, SQL or regex).
- Copy the escaped or unescaped result.
Notes
- Escaping rules differ per context—pick the mode that matches your use.
- SQL escaping is a convenience; use parameterised queries to prevent injection.