MFAYSAL.DEV

HTML Entity Encoder & Decoder

Paste HTML or text and choose a direction. Free, private and runs in your browser.

Your details

Direction

Result

Why escape HTML?

The characters <, >, &, " and ' have special meaning in HTML. If you want to show code on a web page, or insert user input into a page, you must escape them. Otherwise the browser treats them as markup, which can break the layout or open a cross-site scripting (XSS) hole.

Named vs numeric entities

Named entities such as &copy; are easy to read, while numeric ones such as &#169; or &#xA9; work for any Unicode character. The decoder understands named, decimal and hex entities. Modern pages served as UTF-8 don't need £ or é encoded, but the "encode every non-ASCII" option helps with old systems and email templates.

Frequently asked questions

What does &amp; mean?

It is the escaped form of the ampersand (&).

Is escaping enough to stop XSS?

It is the main defence for text inside HTML, but attributes, URLs and scripts need context-specific escaping too.

0data sent
Instantno server
StandardsRFC-based
Copyone click

How to use the HTML Entity Encoder & Decoder

  1. Paste the text, number or code.
  2. Choose encode/decode or the target format.
  3. Read the result instantly.
  4. Copy it into your code or terminal.

Why use this HTML Entity Encoder & Decoder

100% in your browser

Nothing you enter is uploaded or stored.

Instant results

Updates as you type, no waiting.

Mobile friendly

Works on phones, tablets and desktops.

Light & dark mode

Follows your mfaysal.com theme.

Free, no account

No sign-up, no limits, no watermark.

Explained

Formulas, tables and sources on the page.

HTML Entity Encoder & Decoder: chart and reference data

Percent-encoded length of one character – each UTF-8 byte becomes %XX
a (ASCII)1 charsspace3 charsé (2 UTF-8 bytes)6 chars€ (3 bytes)9 chars😀 (4 bytes)12 chars

Source: RFC 3986

Common reserved characters and their encodings
CharacterURL encodedHTML entity
space%20 (or + in forms)&nbsp; (non-breaking)
&%26&amp;
<%3C&lt;
>%3E&gt;
"%22&quot;
'%27&#39;
£%C2%A3&pound;

HTML Entity Encoder & Decoder compared with the alternatives

How this free tool compares
OptionSetupPrivacySpeed
This toolNoneLocalInstant
Command line (base64, xxd)TerminalLocalInstant
Random online converterNoneMay log inputVaries

Who uses it in the UK

  • Debugging APIs, URLs and HTML
  • Embedded and electronics work
  • Computer Science GCSE and A-level
  • Inspecting data and encodings

More questions

Is it safe to paste API keys or tokens here?

The conversion runs entirely in your browser, so nothing is sent anywhere. Still, treat secrets carefully and never share decoded tokens in screenshots.

Is encoding the same as encryption?

No. Base64, URL and HTML encoding are reversible by anyone. They make data safe to transport or display, not secret.

Which standard does it follow?

Base64 follows RFC 4648, URL percent-encoding follows RFC 3986 and text is handled as UTF-8, matching modern browsers and servers.

Does it handle large inputs?

Yes, up to what your browser memory allows – typically several megabytes of text without problems.

✨ New: Remove the background from any image free – private, in your browser, transparent PNG.

Related free tools

Browse all 102 free tools →

Note: This free tool runs entirely in your browser. No data is sent or stored. Results are for information only.