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
Related tools
More from the same category · Developer Tools
Cron ExpressionVisual Cron builder: pick minute-hour-day-month-weekday fields and preview next run times live.JSON FormatterJSON beautify, minify and validate with auto error location for missing brackets and stray commas.Timestamp ConverterConvert Unix timestamps to dates and back with second/millisecond precision and live current time.Regex TesterTest regex with live match highlighting, capture groups and substitution, toggling g/i/m/s flags.JWT ParserSplit a JWT into header, payload and signature, then base64url-decode claims and expiry without a key.JWT GeneratorIssue JWTs with custom header, claims and expiry across HS256, RS256, ES256 for auth-flow testing.