String Escaper
// Safely encode text for JSON, HTML, or CSV. 100% Private.
Raw Text
Escaped Result
// Deep Dive: String Escaping
_json_escaping
When embedding strings into JSON, special characters like double quotes, backslashes, and newlines must be escaped with a backslash to prevent breaking the JSON structure. This tool handles multi-line strings perfectly.
_html_entities
To safely display user-provided text in HTML, characters like `<`, `>`, and `&` should be replaced with their respective HTML entities. This prevents XSS attacks and ensures the browser renders the text correctly.
_uri_encoding
Uniform Resource Identifiers (URIs) only allow a limited set of characters. Our URI mode uses `encodeURIComponent` to ensure your strings are safe for use in URL parameters and query strings.