By Debmedia Technologies LLP · Kolkata, India · Updated
What Is It and When Do You Need It?
Escaping makes special characters safe to put inside a string, a pattern or a document. Each language has its own rules, so a quote that works in one place breaks another.
Choose the format and the direction, paste your text and copy the result.
How to Use This Tool
- Paste your text.
- Choose the format.
- Choose escape or unescape.
- Press Convert.
How the Calculation Works
JSON and JavaScript escape backslashes, quotes and control characters with backslash sequences. HTML replaces & < > " and ' with entities. Regex puts a backslash before every special character. SQL doubles single quotes. CSV wraps the cell in quotes and doubles inner quotes.
Worked Example
The text He said "hi" followed by a line break becomes He said \"hi\"\n in JSON mode.
Common Uses
- Putting text into JSON or code.
- Building safe regex patterns.
- Preparing CSV cells.
- Reading escaped logs.
Tips and Common Mistakes
- Escape once only: escaping twice doubles the backslashes.
- Unescaping needs well-formed input.
- For URLs, use the URL encoder in DebText.
- When you put escaped text inside a code file, remember that the surrounding quotes belong to the language, so add the right kind of quote around the result yourself.
Related Tools
Next, you may need the Base32 encoder, query string parser, SQL IN clause generator, ASCII table.
Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.
Frequently Asked Questions
Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.