What is it?
Escape / Unescape String makes text safe to put inside code or data, and turns escaped text back into plain text.
Who is it for?
Developers putting text into code, JSON, SQL, CSV or regex, data-entry staff preparing CSV files, and anyone fixing text that breaks because of quotes and special characters.
How to use it
- Paste your text.
- Choose For (JSON, JavaScript, HTML, URL, CSV, SQL or regex) and Do (escape or unescape).
- Copy the result.
Which one do I need?
- JSON: a value inside
"…"in a JSON file (quotes, backslashes, new lines). - JavaScript: a string in JS code, including
'and`quotes. - HTML: text shown on a web page (& < > and quotes).
- URL: a value in a web address, like
?q=. - CSV: a spreadsheet cell with commas, quotes or line breaks.
- SQL: a string literal in a query (doubles single quotes).
- Regular expression: search for text exactly, with no special meaning for . * ? ( ).
Unescape shows an error
The text was escaped for a different format, or it is cut off (for example a lone \ at the end, or % not followed by two hex digits). Pick the format it came from and paste all of it.
Worked examples
- JSON:
He said "Hi"becomesHe said \"Hi\", ready to go inside{"msg": "…"}. - SQL:
O'Brienbecomes'O''Brien', so the quote doesn’t end the string early. - CSV:
Ludhiana, Punjabbecomes"Ludhiana, Punjab", so the comma doesn’t split the cell. - Regex:
price (₹)becomesprice \(₹\), so brackets are matched literally.
Related tools
JSON Formatter & Validator · URL Encode / Decode · HTML Entities Encode / Decode
Tool: Escape / Unescape String
Still stuck?
Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.






























Questions, or an error not listed here?
Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.