How to use String Escape and Unescape Tool
- Choose the target string context and Escape or Unescape.
- Paste literal text, or a quoted value in the supported form for that context.
- Convert it and check quotes, backslashes and line breaks.
- Copy the result into the intended string position rather than treating it as a whole program.
Example: String Escape and Unescape Tool
Quote one POSIX shell word containing an apostrophe.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
A quoted value has a boundary
The surrounding quotes and the characters inside them work together. A backslash copied from one context can have another meaning in a different grammar. Use a round trip to inspect the intended literal text, and keep parsing or execution outside this conversion page.
Questions about String Escape and Unescape Tool
Why do SQL and JavaScript quotes look different?
They follow different string grammars. The SQL mode uses the documented standard single-quoted literal form; JavaScript and JSON have their own escape rules.
Does shell quoting make a whole command safe?
It quotes one supported shell word. It does not validate a command, its arguments or the program being called. Do not treat a recovered value as something this page has approved to execute.
Can I use this instead of query parameters?
SQL literal quoting is useful for inspecting text, but application database queries should use their parameter interface. A quoted string does not validate the surrounding query.
Why is an escape sequence rejected?
JavaScript mode accepts a JSON-compatible double-quoted subset, so forms such as single quotes, \x escapes or \v are refused. Other modes also require their named quoted form; check the selected context before unescaping.
Does quoting a CSV field neutralise a formula?
CSV mode quotes separators, quotes and line breaks. Spreadsheet apps may still treat a formula-leading cell as a formula. Use a data-only import or an explicit formula-safe export when that distinction matters.