Escape HTML entities
Escape or unescape HTML entities (replace characters like <,>, &, " and \' with their HTML version)
Escape html entities
Unescape html entities
Frequently Asked Questions
HTML entities are special codes used to represent reserved characters in HTML, as well as invisible characters and characters that are difficult to type with a standard keyboard. For example, since the characters < and > are used to define HTML tags, they must be represented as < and > when you want them to appear as text on a webpage.
Escaping HTML characters is necessary for several reasons:
- To display special characters that would otherwise be interpreted as HTML code
 - To prevent XSS (Cross-Site Scripting) attacks by sanitizing user input
 - To ensure code snippets display correctly when embedded in HTML documents
 - To safely include user-generated content in web pages
 
The most common characters that need to be escaped in HTML are:
| Character | Entity Name | Entity Number | Description | 
|---|---|---|---|
| < | < | < | Less than sign | 
| > | > | > | Greater than sign | 
| & | & | & | Ampersand | 
| " | " | " | Double quotation mark | 
| ' | ' | ' | Single quotation mark (apostrophe) | 
This tool works by:
- For escaping: Converting special HTML characters (<, >, &, ", ') to their corresponding HTML entity codes
 - For unescaping: Converting HTML entity codes back to their corresponding characters
 
All processing is done locally in your browser - no data is sent to any server, ensuring your content remains private.
Related Tools You Might Like

Emoji Picker
Pick an emoji from the list and copy it to your clipboard.

Markdown to HTML Converter
Convert Markdown to HTML with this free online tool. Perfect for creating beautiful documentation, blog posts, and more.

Shrug Emoji Generator
Generate shrug emoji ¯_(ツ)_/¯ in different fonts and styles.

Brat Generator
Create authentic Charli XCX BRAT album style meme images with custom text and colors. Generate lime green aesthetic images inspired by the iconic Brat album cover. Perfect for social media, fan art, and expressing your brat summer energy!

Text Compare
Compare two text documents side by side and highlight differences. Perfect for finding changes between code, articles, or any text versions with line-by-line diff.

ASCII Art Generator
Generate ASCII art from text.