Skip to main content
CheckTown

String Escape/Unescape

Escape and unescape strings for JSON, HTML, URL, SQL, and Regex

Format

Enter a string to escape or unescape

Output updates in real-time as you type

Learn More

String Escaping: How to Handle Special Characters in Code

Understand string escaping for JSON, HTML, URL, SQL, and regex — and why it matters for security.

What Is String Escaping?

String escaping is the process of adding special characters or sequences to a string so that characters with syntactic meaning are treated as literal text. Every programming language and data format reserves certain characters for structural purposes — quotes in JSON, angle brackets in HTML, percent signs in URLs — and escaping ensures these characters are interpreted as data rather than syntax.

6 min readRead full guide