HTML entity encoder and decoder
Encode HTML punctuation or decode semicolon-terminated references, with local processing, a text preview and complete copy and download.
How to use
Choose text encoding or HTML entity decoding, then paste text or select a UTF-8 TXT file. Process and review the preview and its limits. Copy the complete result or download a TXT file. Editing input or options invalidates the previous result; output never replaces input. After oversized text or incomplete Unicode is rejected, processing the old text stays blocked until that text is edited; changing operation or source does not clear the rejection, while an independent valid file can still run. The native clipboard may normalize line endings depending on the browser and system, while TXT preserves the result’s literal UTF-8 bytes and line endings.
Encoding <p title="x">عربي & 'text'</p> gives <p title="x">عربي & 'text'</p>. Decoding &lt; once gives <, while &unknown; and & without ; stay unchanged. The reference € produces €.
Support & limits
Encoding replaces only &, <, > and the double and single quotation marks, using ' for the apostrophe, while leaving Unicode and controls literal. Decoding uses HTML rules with required ; and one pass, not XML rules or HTML validation. Unknown and incomplete references remain text; different spellings may produce the same character, so original entity spelling is not preserved. �, � and � become U+FFFD, and € becomes €. Literal isolated Unicode surrogate units are rejected. Files retain BOM, CRLF and NUL; the browser textarea may normalize line endings to LF. When NUL occurs, copying uses a quoted, escaped JSON string while TXT download keeps the raw UTF-8 bytes. Output is never executed, uploaded, saved or copied automatically.
Common questions
Does the result become safe to insert into any page or program?
No. This is a text conversion tool, not a sanitizer; decoding may produce HTML punctuation that looks like code. It is displayed here only as text. JavaScript, CSS and URL contexts need appropriate handling in the application using the text. There is no HTML preview, legacy or attribute mode, or blanket ASCII conversion.
Related tools
Base64 encoder and decoder
Encode local UTF-8 text or a file as Base64/Base64url, and decode to text or a file.
URL encoder and decoder
Encode a complete URI or a component and decode percent escapes locally as text.
Unicode inspector
Inspect the original Unicode code points and grapheme clusters, and apply explicit normalization to a separate text result.