Your files stay on your device

# Escape and unescape text

Escape or unescape text for HTML, JavaScript strings, and CSV.
Loading editor…

The result shows up here as you type.
OptionsCopy result

## Named and numeric entities

HTML escaping replaces five characters that carry meaning in markup. The ampersand becomes &amp;, the less-than sign <, the greater-than sign >, the double quote ", and the apostrophe '. Without escaping, a stray less-than sign opens a tag, and a bare ampersand can start an entity reference that a parser reads differently than you meant.

## JavaScript string literals

 \" A double quote inside a double-quoted string
 \\ One literal backslash
 \n A line break
 \u00e9 A character written by its code point, here e with an acute accent

## CSV quoting

A CSV field containing a comma, a double quote, or a line break is wrapped in double quotes. Inside the wrapper, every double quote is doubled. So the text He said "hi", ok becomes the field "He said ""hi"", ok" (RFC 4180).

## More text tools

- [Number base converter](/text/number-bases)
- [JSON string escape](/json/escape)
[All text tools](/text)

Was this tool useful?
YesNo

---

Canonical HTML: https://nutter.tools/text/escape
Markdown version: https://nutter.tools/text/escape.md
Plain-text version: https://nutter.tools/text/escape.txt
Agent index: https://nutter.tools/llms.txt

