HTML Entity Encoder/Decoder
Encode or decode HTML entities instantly. Free online HTML entity encoder for special characters.
Output will appear here...
What is HTML Entity Encoder/Decoder?
HTML entities are special codes that represent characters which have reserved meaning in HTML. For example, < becomes <, > becomes >, and & becomes &. Encoding these characters prevents the browser from interpreting them as HTML tags. This is essential for displaying code snippets, user-generated content, and special symbols safely on web pages.
How to Use
- Select Encode or Decode mode using the toggle buttons
- Paste or type your text or HTML entities in the input area
- The converted result appears instantly in the output panel
- Use Swap to reverse the direction and work back and forth
Examples
Encode HTML special characters
Decode HTML entities
Related Tools
URL Encoder/Decoder
Encode or decode URL components instantly. Free online URL encoder and decoder for special characters.
Base64 Encode & Decode
Encode text to Base64 or decode Base64 to text. Free online Base64 encoder and decoder with instant conversion.
JSON String Escape/Unescape
Escape and unescape strings for JSON. Handle newlines, quotes, backslashes, and tabs. Free online JSON string escape tool.
Unicode Escape/Unescape
Convert Unicode characters to \uXXXX escape sequences and back. Free online Unicode escape unescape tool with surrogate pair support.
Frequently Asked Questions
Which characters need to be encoded in HTML?
The five mandatory characters: & (&), < (<), > (>), " ("), and ' ('). The & must always be encoded first to avoid double-encoding. Other special characters like ©, —, and é have named entities but can also be represented as numeric entities (©).
What is the difference between named and numeric entities?
Named entities use descriptive names (&, <, ©). Numeric entities use decimal (©) or hex (©) code points. Named entities are more readable; numeric entities work for any Unicode character, even those without a named entity.
When should I encode vs decode?
Encode when inserting text into HTML that might contain special characters (user input, code snippets, data from APIs). Decode when extracting text from HTML sources or displaying entity-encoded content as plain text.