HTML Entity Encoder & Decoder

Convert special characters to HTML entities and back again

0 chars, 0 lines
0 chars, 0 lines

Options

Statistics

Characters: 0
Words: 0
Lines: 0
Entities: 0
Bytes: 0

Quick Reference

& → &
< → &lt;
> → &gt;
" → &quot;
' → &apos;

Why Use This Tool

Fast

See results as you type. No waiting, no loading spinners.

Private

Everything happens in your browser. We never see your data.

Works Offline

Install it as an app and use it without internet.

Multiple Formats

Choose between named, decimal, or hexadecimal entities.

File Support

Upload and download .txt, .html, and .xml files.

Free

No signup, no payment, no limits. Just use it.

How to Use

  1. Paste your HTML in the input box
  2. Pick a format (Named, Decimal, or Hex)
  3. Copy the result or download it as a file

Need to decode instead? Use the HTML Decoder.

When You Need HTML Encoding

Showing Code Examples

When you want to display HTML code on a webpage without it being executed.

User Input

Before displaying text from users to prevent XSS attacks.

Email Templates

To ensure special characters display correctly across different email clients.

Data Export

When saving HTML to databases or XML files.

Common Questions

What is HTML entity encoding?

It converts special characters like &, <, and > into their entity equivalents (&amp;, &lt;, &gt;). This lets you show these characters on a webpage without the browser treating them as HTML code.

What's the difference between the formats?

Named entities use readable names (&amp;), decimal uses numbers (&), and hex uses hexadecimal (&). They all do the same thing, just written differently. Named is usually easiest to read.

Is my data safe?

Yes. All encoding happens in your browser using JavaScript. Your text never gets sent to any server. You can even use it offline after installing it as an app.

Can I process large files?

Yes. The tool uses web workers to handle large files without freezing your browser. You can upload and download files up to several megabytes.

More Tools

HTML Decoder

Convert entities back to regular text

HTML Minifier

Remove whitespace and compress HTML

HTML Formatter

Format HTML with proper indentation

HTML Validator

Check for syntax errors