String Escaper
Escape and unescape strings for various formats and programming languages.
Format Reference
JSON
Escape for JSON strings
HTML
Escape HTML entities
URL
Percent-encode for URLs
JavaScript
Escape for JS strings
Regex
Escape regex special chars
SQL
Escape single quotes for SQL
CSV
Quote and escape for CSV
Why Escape Strings?
String escaping is essential when working with different data formats and programming languages. Special characters need to be escaped to prevent syntax errors, security vulnerabilities, or data corruption.
Common Use Cases
- JSON - Escape special characters in JSON string values
- HTML - Prevent XSS attacks and display special characters
- URL - Encode parameters for safe transmission in URLs
- JavaScript - Escape strings for use in JS code
- Regex - Escape special regex characters for literal matching
- SQL - Escape quotes to prevent SQL injection
- CSV - Properly quote fields containing delimiters