Initializing, please wait a moment

Paste plain text or text that already contains HTML entities, then click the convert button; the tool auto-detects the direction and shows the encoded or decoded result on the right.

Encoding replaces the five characters that break HTML markup - &, <, >, ", and ' - with their entity form. Decoding reverses named entities like &amp; and numeric entities like &#39; back into plain characters. Nothing you paste is uploaded; the conversion happens entirely in this browser tab.

Input: bytes
Output: bytes

HTML Entity Encoder & Decoder


Paste text into the box. If it already contains HTML entities like &amp; or &#39;, the tool decodes them back to plain characters; otherwise it escapes the characters that break HTML markup - no mode switch to pick.

Reach for this when you are embedding user-typed or untrusted text into an HTML page or attribute - a comment, a bio field, a code sample in a blog post - and need &, <, >, ", and ' to render as literal characters instead of being parsed as markup.

This is not the same job as Base64 Encoder & Decoder. Base64 re-wraps a whole string or file into a compact transport-safe form; this tool only escapes the five characters that conflict with HTML syntax and leaves everything else untouched - use Base64 when you need to move binary data through a text-only channel, and this tool when you need text to display correctly inside HTML.

Decoding accepts named entities (&amp;, &nbsp;, &copy;) and numeric entities (&#39;, &#x27;) - anything the browser's own HTML parser recognizes.

Everything runs locally in this browser tab - no upload and no account, and nothing you type is saved once you leave the page.

← Back to Developer Tools

Related tools:

  • MD5 converter - Free online MD5 hash generator and MD5-to-text reverse lookup.
  • Convert PDF to TEXT online - Extract text from PDF online for copying and editing.
  • Text To HTML Editor - Text to HTML editor online - write in a WYSIWYG view and watch the generated HTML update live, with
  • CSS Gradient Animator Generator - CSS gradient generator - build animated linear gradients with live preview; copy ready-to-paste CSS
  • CSS Minifier - Minify CSS online for faster page loads.
  • CSS UnMinifier - CSS unminifier online - beautify minified CSS with proper indentation, line breaks, and readable
  • JavaScript Minifier - JavaScript minifier online free - paste your JS, click Minify, and copy the compressed code.
  • JSON Parser By Tree View - Paste JSON to validate, format, and view it in a tree.
  • JavaScript UnMinifier - JavaScript unminifier online - reformat minified JS with indentation and line breaks for
  • Keyboard Test - Keyboard test online - press each key to highlight it, spot non-working keys, and verify Num Lock,
  • Text Diff - Text diff online - compare two text blocks and highlight added, removed, and changed characters,
  • Developer Tools - Developer tools to parse JSON, minify or unminify CSS/JS, compare text, and generate MD5 hashes.

Tags: #developer

Related guides:

Loading reviews...

Frequently Asked Questions

What does HTML Entity Encoder & Decoder do?

It escapes the characters that break HTML markup (&amp;, &lt;, &gt;, &quot;, &#39;) when you paste plain text, or turns HTML entities back into plain characters when you paste text that already contains them. Direction is auto-detected from your input.

When should I reach for HTML Entity Encoder & Decoder?

Use it when you are embedding user-typed or untrusted text into an HTML page or attribute - a comment, a bio field, a code sample - and need special characters to render as literal text instead of being parsed as markup.

How is this different from Base64 Encoder & Decoder?

Base64 re-wraps a whole string or file into a compact transport-safe form for moving binary data through a text-only channel. This tool only escapes the five characters that conflict with HTML syntax and leaves the rest of the text untouched - use it when the text needs to display correctly inside HTML, not when you need to transport binary data.

Does this sanitize or remove HTML tags from my input?

No. It only escapes or unescapes the five markup-breaking characters; it does not strip tags or scripts. It is not a substitute for an HTML sanitizer when the goal is to remove dangerous markup rather than display it as text.

Is my text uploaded anywhere?

No. Everything runs locally in this browser tab - no upload, no account, and nothing you type is saved once you leave the page.