Essential HTML Encoding
Encode ampersands, angle brackets, double quotes and apostrophes.
VeltoGen's free HTML encoder decoder converts special characters into HTML entities and restores supported entities to readable text. Use our HTML encoder to create named, decimal or hexadecimal character references, or use the HTML decoder online to decode them directly in your browser.
Select whether to encode special characters or decode existing HTML character references.
Named mode uses common HTML character names. When you enable non-ASCII encoding, it uses decimal references for other characters.
Enter HTML source or ordinary text. The converter will encode the supported characters using your selected format.
Choose whether non-ASCII Unicode characters should also be converted.
The five essential characters are always encoded: &, <, >, " and '. Existing references will be encoded again, so < becomes &lt;.
Entity encoding is not encryption or a universal HTML sanitizer. Use context-appropriate escaping when building applications.
VeltoGen's free HTML encoder decoder helps you convert ordinary characters into HTML character references and decode supported references back into readable text.
An HTML entity can represent a character with a readable name or a numeric Unicode value. For example, <, < and < all represent the less-than sign.
Use the HTML encoder to encode essential HTML characters in Named, Decimal or Hexadecimal format. You can also enable encoding for non-ASCII Unicode characters such as currency symbols and emoji.
Our HTML decoder online converts supported named and numeric references back into characters. Your output appears as literal text, without rendering HTML markup.
Convert HTML characters in four simple steps.
Select whether you want to create HTML references or convert them back into readable text.
For encoding, choose Named, Decimal or Hexadecimal and optionally include non-ASCII characters.
Paste ordinary text, HTML source or complete HTML character references.
Click Encode HTML or Decode HTML, then copy or download the complete output.
Work with character references, Unicode text and multiple encoding formats.
Encode ampersands, angle brackets, double quotes and apostrophes.
Choose named, decimal numeric or hexadecimal numeric references.
Optionally encode non-ASCII characters, including multilingual text and emoji.
Decode browser-supported semicolon-terminated HTML character references.
Display decoded HTML markup as literal text instead of rendering it.
Copy full results, download UTF-8 text and reuse output as input.
Save time when converting special characters and inspecting escaped HTML text.
Convert repeated special characters without editing them individually.
Encode HTML markup characters when preparing source examples for display as text.
Keep multilingual content readable or represent non-ASCII text as numeric references.
Copy, download or convert the output again with the opposite operation.
Useful for web developers, technical documentation, debugging and Unicode content.
Prepare markup examples so less-than and greater-than signs can be displayed literally.
Convert characters with special meaning in HTML character-reference contexts.
Inspect named and numeric entities found in HTML-related text data.
Optionally convert non-ASCII letters, symbols and emoji to numeric references.
These five essential characters are encoded by default in the selected output format.
| Character | Named | Decimal | Hexadecimal |
|---|---|---|---|
& | & | & | & |
< | < | < | < |
> | > | > | > |
" | " | " | " |
' | ' | ' | ' |
<p>Hello & welcome!</p> <p>Hello & welcome!</p> The output is shown as text, not as executable HTML. This illustrates Named mode.
Learn about character references, HTML escaping, Unicode handling and correct output contexts.
HTML character references represent characters using a name or a Unicode numeric value. For example, <, < and < all represent a less-than sign.
Named entities use a recognizable identifier such as &, < or ". This tool uses named output for five essential characters and numeric fallback for other non-ASCII characters.
Decimal references use the form &#number;, while hexadecimal references use &#xnumber;. Both can represent Unicode code points.
Decoding converts complete, supported semicolon-terminated references back to characters. Unknown and incomplete references remain unchanged, and the tool performs one decoding pass at a time.
When enabled, non-ASCII characters such as ©, €, Hindi letters, Arabic letters and emoji are represented as numeric references. Valid surrogate pairs are treated as one Unicode code point.
Entity encoding is useful for certain HTML text and attribute contexts, but it is not a universal defense against injection. JavaScript, CSS, URLs and other contexts need appropriate handling.
The converter works locally in the browser, and decoded output is displayed as text. It does not intentionally send input to a conversion API or execute decoded tags.
This component converts text in your browser without intentionally uploading it to a conversion API or storing it in browser storage.
Converted output is displayed as literal text. Clearing the tool does not remove downloaded files or clipboard content. HTML entity conversion is not a replacement for context-aware sanitization and escaping.
Common questions about named HTML entities, Unicode, numeric references and safe decoding.
An HTML encoder decoder converts special characters into HTML character references and converts supported character references back into readable characters.
Select Encode, choose Named, Decimal or Hexadecimal format, paste your text and click Encode HTML. You can then copy or download the complete result.
Choose Decode, paste the HTML entity text and click Decode HTML. The result appears as readable text rather than rendered HTML.
Yes. VeltoGen provides free browser-based HTML entity encoding and decoding without registration or software installation.
HTML character entities are references such as <, & and " that represent characters in HTML content. Numeric references use decimal or hexadecimal Unicode values.
By default, the tool encodes ampersands, less-than signs, greater-than signs, double quotation marks and apostrophes.
Named references use names such as <. Decimal references use numbers such as <. Hexadecimal references use hexadecimal values such as <.
Named mode uses named references for five essential characters. When non-ASCII encoding is enabled, other non-ASCII characters use decimal numeric references.
Yes. The tool uses the browser HTML parser to decode supported named and numeric character references that end with a semicolon.
No. This converter intentionally requires complete semicolon-terminated references. Incomplete sequences remain unchanged.
Yes. Enable non-ASCII encoding to represent non-ASCII Unicode characters as numeric character references, including characters from Hindi, Arabic and emoji.
Yes. Decimal mode creates references such as <, and Decode mode can interpret supported decimal character references.
Yes. Hexadecimal mode creates references such as <, and the decoder supports hexadecimal numeric references.
Each conversion performs one decoding pass. Use Output as Input and run Decode again if you intentionally want another pass.
Unknown named references, incomplete references and unsupported sequences are left unchanged instead of being guessed.
No. Converted output is displayed as literal text using Angular interpolation. The tool does not execute or render decoded markup.
No. Correct escaping depends on the context. HTML text, HTML attributes, JavaScript, CSS and URLs have different safety requirements.
HTML defines error-handling behavior for invalid numeric character references. Some invalid values decode to a replacement character.
The tool accepts up to 200,000 UTF-16 code units. Large output previews are shortened, but copying and downloading include the full result.
This component performs conversions locally in the browser. It does not intentionally upload the input to a conversion API or save it to browser storage.