String Escape Tool
Choose one precise context so the output stays clear about what can be decoded back.
A QUICK WALKTHROUGH
How to use this tool
- Enter up to 1 MB of text.
- Choose a context and Escape or Decode.
- Review and copy the result.
Explicit contexts
JSON string content escapes JSON controls and quotes without surrounding quotes. Complete JSON string includes the surrounding JSON quotes. HTML text escaping covers &, <, >, and quotes as entities. JavaScript single-quoted literal escapes backslash, single quote, line breaks, and common controls.
Matching decode only
Decode expects the selected context. It does not guess formats or parse arbitrary source code. Input is limited to 1 MB and processing is local.
GOOD TO KNOW
Common questions
Does JSON string content include quotes?
No. Complete JSON string mode includes the surrounding quotes.
Can HTML output be decoded?
Yes, using HTML text mode; it decodes the entities produced by that mode.
Does this evaluate JavaScript?
No. JavaScript mode only transforms a single-quoted literal representation.