🪢 String Escape / Unescape
Convert strings between HTML entities, JavaScript strings, JSON strings, Unicode escapes (\uXXXX), and URL encoding.
✅ 100% free, no signup, runs entirely in your browser
📖 Examples
| Format | Raw | Escaped |
|---|---|---|
| HTML | <a> | <a> |
| JS | It"s "ok" | It\"s \"ok\" |
| JSON | tab here | tab\thero |
| Unicode | 日本語 | \u65e5\u672c\u8a9e |
| URL | a b&c | a%20b%26c |
🔗 Related Tools
📖 How to Use
-
1
Choose format and directionSelect the format (HTML, JavaScript, JSON, Unicode, URL, etc.) and direction (escape or unescape).
-
2
Enter your textPaste or type text in the left input field. The conversion happens in real time.
-
3
Copy or swap the resultCopy the output on the right, or click the swap button to reverse input/output and convert in the opposite direction.
❓ FAQ
What is the difference between HTML escape and URL encoding?
HTML escape converts & < > " to HTML entities like &. URL encoding converts spaces and special characters to percent-encoded form like %20.
Can it escape non-ASCII characters like Japanese?
Yes. Select the Unicode (all chars) or Hex (UTF-8 bytes) mode to escape all non-ASCII characters including Japanese.
Can this be used to prevent SQL injection?
The SQL mode escapes single quotes by doubling them, but always use prepared statements in production. This tool is intended for learning and verification.