HTML Encode / Decode
Encode or decode HTML entities. Type or paste below — the result updates as you type.
Input
Mode
Output
Private by design
This conversion runs entirely in your browser. Your text is not sent to a server.
Tip
Encoding turns < & " into entities so the text is safe to show. It is not encryption.
How to convert with HTML Encode / Decode
Paste or type HTML or plain text in the input box.
Watch entities update instantly — nothing is uploaded.
Choose Encode to escape markup, or Decode to restore it.
Copy the result, or use it as the next input.
When should you use it?
Markup
Escape user-supplied strings before they go into HTML.
Snippets
Copy a fragment as entities for docs, emails, or CMS fields.
Escaping
Turn < & " into entities, or decode them back to characters.
Not encryption
Anyone can decode entities. Do not use this to hide secrets.
Your text stays private.
HTML encoding and decoding run entirely in your browser. Markup is never uploaded.
About HTML entities in the browser
HTML Encode / Decode turns < & " into entities so text can sit in markup, or restores those entities to characters. It is a local helper, not a sanitizer and not a full HTML parser. Do not treat it as XSS protection for untrusted HTML. Encoding is not encryption; anyone can decode entities. Quotes and ampersands matter in attributes as much as tags in body copy.
Worked example: <div class="x"> becomes <div class="x"> on encode. Decode reverses common named and numeric entities the browser understands. Round-trip encode then decode should match typical snippets.
This is not HTML Formatter (pretty-print tags) and not Markdown Preview (rendered page). Related: URL Encode for query strings, JSON Formatter for data, Markdown → HTML for source from notes. Nothing is uploaded. Convert to keeps input between encode and decode.
Related encoding tools
Hex Encode / Decode
Convert text to hexadecimal bytes, or hex back to UTF-8. Type or paste below — the result updates as you type.
URL Encode
Percent-encode text for use in URLs. Type or paste below — the result updates as you type.
Base64 Encode
Encode text to Base64 (UTF-8 safe). Type or paste below — the result updates as you type.
Markdown → HTML
Convert Markdown to HTML source. Type or paste below — the result updates as you type.
HTML Formatter
Pretty-print or minify HTML in your browser. The result updates as you type.
HTML Encode / Decode examples
Tag
Quotes
Ampersand
Encode vs decode
| Action | Example | Typical use |
|---|---|---|
| Encode | <div>A & B</div> | Escape tags and quotes before you display untrusted text |
| Decode | <div>A & B</div> | Restore markup from HTML entities |
HTML Encode / Decode FAQ
Encode turns < & " into HTML entities. Decode restores those characters. The result updates as you type and stays in this browser.
It is a local helper for entities, not a full HTML sanitizer. Do not treat it as a security library for untrusted HTML.