RU

Text Escape & Unescape Online

Free tool for escaping and unescaping text in JSON, XML and URL formats

text-escape
Text EscapeJSON
Was this tool helpful?
{ }

JSON Escape

Escape special characters for JSON strings

< >

XML Escape

Escape special characters for XML/HTML

%

URL Escape

Percent-encoding for URLs

Round-trip

Lossless escape and unescape

Related Tools

Frequently Asked Questions

Escaping replaces special characters with safe sequences that do not break the format's syntax. For example, a quote inside a JSON string without escaping would prematurely end the string, but when escaped it becomes part of the content.
Escaping is necessary when inserting user input into JSON, XML, HTML, or URLs. Without it, special characters can break the document structure, cause parsing errors, or create security vulnerabilities.
In JSON, you escape quotes (\"), backslash (\\), newline (\n), tab (\t), and carriage return (\r). In XML, five characters are escaped: < (&lt;), > (&gt;), & (&amp;), " (&quot;), and ' (&apos;).
JSON uses backslash sequences for escaping (\n, \", \\), while XML replaces characters with entities (&lt;, &amp;, &quot;). These are different formats with different rules, so choosing the correct escaping mode matters.