Escape HTML characters or unescape HTML entities online. Convert, copy, and download the result without changing your original input.
Load sample data to get started
What this tool can do
Five Reserved Characters
Escape &, <, >, double quotes and apostrophes
HTML Entity Decoding
Decode named, decimal and hexadecimal references
Single-Pass Conversion
Existing entities are not double-escaped or repeatedly decoded
Text Preserved
Unicode, spaces and line breaks remain intact
Copy or Download
Copy the result or save it as a plain-text file
Clear Both Panels
Reset the input, output and status
Methodology and approach
Escape &, <, >, double quotes and apostrophes as HTML character references, or decode recognized named and numeric HTML entities back into text.
An HTML escape and unescape tool converts between reserved HTML characters and their character references. Escaping writes characters such as < and & as < and &, which lets markup be shown as text. Unescaping reads recognized references and returns the characters they represent.
The output remains plain text in this tool. Decoding an entity into a less-than sign does not execute or render the resulting markup.
Enter or paste HTML or plain text in the input editor, then choose Escape. Review the converted text in Result HTML Data, and use Copy Output or Download to save it. The input is kept unchanged, so you can edit it and run Escape again whenever needed.
Paste encoded text into the input editor and choose Unescape. Named HTML references and decimal or hexadecimal numeric references are decoded in one pass; references that are not recognized are left as text. Copy or download the result when it is ready.
Escape markup when you need to display an HTML snippet as text, prepare source examples for documentation, or represent reserved characters in HTML text. Context matters: HTML escaping alone does not make a value safe in JavaScript, CSS, a URL, or every other output context. Use the encoding or sanitization rules for the destination where the value will be placed.
Common questions about this tool