Skip to content

🪢 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

FormatRawEscaped
HTML<a>&lt;a&gt;
JSIt"s "ok"It\"s \"ok\"
JSONtab heretab\thero
Unicode日本語\u65e5\u672c\u8a9e
URLa b&ca%20b%26c

🔗 Related Tools

📖 How to Use

  1. 1
    Choose format and direction
    Select the format (HTML, JavaScript, JSON, Unicode, URL, etc.) and direction (escape or unescape).
  2. 2
    Enter your text
    Paste or type text in the left input field. The conversion happens in real time.
  3. 3
    Copy or swap the result
    Copy 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.