HTML Entities Encoder / Decoder
Encode text to HTML entities or decode HTML entities back to plain text.
Converts characters like <, >, &, and " into safe HTML entity equivalents.
Plain Text
Encoded HTML Entities
Changes update instantly
Examples
Input
<a href="https://example.com">Link & more</a>
Output
<a href="https://example.com">Link & more</a>
Input
<h1>Hello & World</h1>
Output
<h1>Hello & World</h1>
About this tool
Use this HTML entities tool to encode special characters into their HTML entity equivalents, or decode HTML entities back into readable text. It is useful for safely embedding HTML in code, escaping user input for display, and reading encoded HTML.
How to use
- Choose encode or decode mode.
- Paste or type your text in the input panel.
- Copy the converted output from the result panel.
What HTML entities are
HTML entities are special sequences used to represent characters that have meaning in HTML markup, such as < (less than), > (greater than), & (ampersand), and " (double quote). Using entities prevents browsers from misinterpreting these characters as HTML tags or attributes.
Encoding text to HTML entities is important when displaying user-generated content, embedding code snippets in pages, or writing HTML that should appear as text rather than rendered markup.
Encoding versus decoding
Encoding converts plain text with special characters into safe HTML entity sequences. Decoding reverses this, turning entity sequences back into the original characters. Both directions are useful depending on whether you are preparing content for HTML output or reading encoded content.
FAQ
What characters get encoded?
The encoder converts &, <, >, ", and ' into their HTML entity equivalents (&, <, >, ", ').
What entities can be decoded?
The decoder handles named entities like &, <, ©, €, numeric entities like ©, and hex entities like ©.
Is this the same as URL encoding?
No. HTML entity encoding is for safe HTML display, while URL encoding is for encoding characters in URLs. They use different formats and serve different purposes.
Related Tools
Color Converter
Convert colors between HEX, RGB, and HSL formats instantly.
Open tool
Base64 Encoder & Decoder
Encode or decode Base64 strings instantly.
Open tool
URL Encoder & Decoder
Encode or decode URLs instantly.
Open tool
JSON Formatter
Format and validate JSON instantly.
Open tool
Case Converter
Convert text to uppercase, lowercase, or title case instantly.
Open tool
JWT Decoder
Decode JWT header and payload instantly.
Open tool