Skip to content
MewixMewix

HTML entity encoder

Choose encode or decode, paste text, and copy the result — useful when you need literal angle brackets or named entities in markup.

Updated by the Mewix team

Escape text for HTML contexts

Encode sets plain text on a temporary textarea and reads innerHTML, producing entities such as &lt; for <. Decode assigns entity markup to innerHTML and reads the decoded value back. Processing stays in your browser tab.

Not a full HTML sanitizer

This does not strip scripts or allowlisted tags for untrusted user HTML. Use it for escaping snippets you plan to embed as text, not for cleaning arbitrary markup from the web.

Questions

Does encode handle non-breaking spaces?

Browser encoding may emit numeric or named entities depending on the character. For Markdown output, see the Markdown to HTML converter instead.

Can decode fix double-encoded ampersands?

Run decode once per encoding layer. Repeated decode on &amp;lt; may need two passes depending on how the string was stored.