AnyTool
Your files never leave your device. All processing happens locally in your browser.

How do I encode or decode HTML entities?

Paste text into AnyTool's HTML Entity Encoder to convert special characters to named, decimal, or hex entities — or decode entities back to text. Conversion happens live in your browser, with nothing uploaded.

  • Encode and decode in one tool, live as you type
  • Named (©), decimal (©), and hex (©) output
  • Scope presets: reserved-only, non-ASCII, or everything
  • 100% in your browser — no upload, no signup, free

What is

HTML Entity Encoding

HTML entity encoding replaces characters that have special meaning in HTML (like < > & " ') or non-ASCII symbols with entity references such as &lt;, &#169;, or &#xA9;, so they display correctly and safely. Decoding reverses the process.

Developer Tools

Related terms

Named EntityNumeric EntityHTML EscapeSpecial Characters

How to Encode HTML Entities

Encode and decode HTML entities entirely in your browser.

10 secWeb browser
  1. 1

    Paste text

    Enter the text or entities you want to convert.

  2. 2

    Choose format & scope

    Pick named/decimal/hex output and which characters to encode.

  3. 3

    Copy the result

    The converted output updates live; copy it with one click.

Result: Encoded or decoded HTML text

Frequently Asked Questions

Yes — it is free and converts entirely in your browser, so text is never uploaded.

AnyTool encodes and decodes HTML entities locally using a spec-accurate library, so your text stays on your device and the tool works offline.

Yes — toggle between named (&copy;), decimal (&#169;), and hex (&#xA9;) output.

You control the encoding format and the scope — reserved characters only, all non-ASCII, or everything — so the output fits your context, including emoji and astral symbols.

Yes — the decoder handles named, decimal, and hex entities simultaneously.

Decoding uses the browser's own HTML parser semantics, so it correctly resolves every named and numeric entity in one pass.

Detailed Explanation

Methodology

How HTML Entity Encoding Works

AnyTool encodes characters to HTML entities with a spec-accurate library (html-entities), exposing named (&copy;), decimal (&#169;), and hex (&#xA9;) output and three scope presets: reserved characters only, all non-ASCII, or everything. Decoding resolves named and numeric entities simultaneously using the browser's own HTML parser semantics. Input is iterated by code point so emoji and astral symbols encode correctly. Conversion is live and entirely client-side, so text is never uploaded.

  • Named, decimal, and hex entity output
  • Scope presets: reserved-only / non-ASCII / everything
  • Universal decode of named + numeric entities
  • Code-point iteration for emoji/astral safety
  • Live conversion; offline; no upload