Code Escape Tool
Escape/unescape code strings, handling quotes, newlines, tabs and other special characters.
Conversion Settings
Source Code
Conversion Result
Escape Reference
\nNewline\rCarriage Return\tTab\\Backslash\'Single Quote\"Double Quote\0NULL\bBackspace\fForm Feed\vVertical Tab<Less Than>Greater Than&AmpersandUsage Guide
This tool escapes or unescapes special characters in code strings, supporting multiple programming languages and quote styles.
Features
- Supports JavaScript, Python, Java, HTML, JSON, and more languages
- Optional single quote, double quote, backtick, or no quote wrapping
- !Optional Unicode escaping (
\uXXXX) and HTML entity escaping - Supports reverse operation: restore escaped strings to original characters
- Provides common escape character reference table
Steps
- Select target language and quote type in "Conversion Settings"
- Check "Escape Unicode" or "Escape HTML Entities" as needed
- Enter or paste content in the "Source Code" box on the left
- Click "Escape →" for forward conversion, or "← Unescape" for reverse conversion
- View output in the "Conversion Result" box on the right, click "Copy" to copy
Notes
- Unescaping automatically removes matching surrounding quotes
- !HTML mode uses HTML entities for escaping (
<, etc.) - !Unicode escaping outputs in
\uXXXXor\uformat - All conversions are done locally in the browser; data is never uploaded to any server