String Escape/Unescape
Last updated: 2026 · Free online tool
What is String Escape/Unescape?
Free online tool to escape and unescape strings for 7 languages: JavaScript, Python, Java, Go, PHP, SQL, and HTML. Convert special characters into \n, \t and similar, or restore them.
How to Use
- 1 Select language and direction — Choose the language and direction (escape/unescape).
- 2 Enter string — Enter the string to convert.
- 3 Copy result — Copy the converted result.
Related Tools
HTML Entity Encoder/Decoder Free online tool to encode HTML special characters like <, >, & into safe entities or decode entities back to text, supporting named, decimal, and hex formats for XSS-safe markup
URL Encoder/Decoder Free online tool to encode and decode URL strings with percent encoding (%XX) and parse URL query parameters. Built on encodeURIComponent, it safely converts spaces and non-ASCII characters to UTF-8 bytes.
Find & Replace Free online find and replace tool for text and code. Search with plain text or regular expressions, toggle case sensitivity and replace all matches at once, right in your browser.
Frequently Asked Questions
Seven languages: JavaScript, Python, Java, Go, PHP, SQL, and HTML.
Escape converts special characters to safe representations (\n, \t, etc.), while unescape restores them to the original characters.
Yes, using JavaScript mode provides JSON-compatible escaping.
Use it for reference only. For actual security, use Prepared Statements.
No.