All tools

String Escape

Encode / Decode

Escape and unescape strings for JSON, JavaScript, HTML, URL, and CSV

One tool covers five separate escaping conventions (JSON, JavaScript, HTML entities, URL encoding, and CSV field escaping) as distinct modes, so instead of remembering which characters each format cares about you just pick the target and paste. A typical use: taking a string with quotes and getting it JSON-escaped for embedding in a payload, or HTML-escaping `<`, `>`, and `&` before injecting user text into a page. It's worth being clear-eyed about what HTML escaping here buys you: it reduces risk but isn't a substitute for a real sanitization library in an actual application, so treat it as a debugging aid rather than a security control. It also only escapes individual string values; escaping an entire JSON object into a string is a job for the JSON Formatter's minify mode or your language's own serializer instead. Everything runs locally.

escapeunescapejsonhtmlurl

How to use String Escape

  • 1.Paste a string containing quotes or special characters and select JSON mode to get a properly escaped string ready to embed in a JSON payload.
  • 2.Switch to HTML mode to escape `<`, `>`, and `&` before injecting user-generated text into a web page to prevent broken markup.
  • 3.Use unescape mode to decode a string you copied from a log file or source code back into its raw, readable form.

Frequently asked questions

Which formats are supported?
JSON, JavaScript, HTML entities, URL encoding, and CSV field escaping are all supported as separate modes.
Is my data sent to a server?
No, all escaping and unescaping happens locally in your browser.
Does HTML escaping here prevent XSS?
Escaping the specific characters this tool handles reduces risk, but it's not a substitute for a proper sanitization library in your actual application — treat this as a debugging aid, not a security control.
Can I escape a whole JSON object, not just a string?
This tool works on individual string values. For escaping an entire object into a JSON string, use the JSON Formatter's minify mode or your language's built-in JSON serializer.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/string-escape \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"input":"Hello\n\"World\"","mode":"escape"}'

Get an API key from your dashboard · Full API docs →