HTML Encode/Decode

Convert all applicable characters to HTML entities, or vice versa

Tags: decoder encoder html html encode/decode

🚀 315,089 total conversions (40 this month)

Practice Python with coding challenges

Solve hands-on problems right in this editor: run the sample tests, submit, and get an AI code review.

All Python challenges
Easy

Average of Three

Average three whole numbers.

BeginnerLearning-pathVariables
Easy

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

BeginnerLearning-pathVariables
Hard

Course Schedule Order

Order courses so every prerequisite comes first.

AdvancedGraphsHackathonTopological-sort
No solutions yet
Medium

Island Perimeter

Measure the coastline of land cells in a grid.

AdvancedGridsHackathon
No solutions yet
Medium

K-th Smallest Element

Find the k-th smallest value without fully sorting.

AdvancedCompetitive-programmingSorting
No solutions yet
Hard

Median of Two Sorted Arrays

Find the median of two sorted lists combined.

AdvancedBinary-searchCompetitive-programming
No solutions yet
Medium

Game of Life Step

Advance Conway's Game of Life by one generation.

AdvancedGridsHackathonSimulation
No solutions yet
Hard

Shortest Delivery Tour

Visit every city once and return home as cheaply as possible.

AdvancedBitmasksCompetitive-programmingDynamic-programming
No solutions yet
Hard

Strongly Connected Components

Count groups of nodes that can all reach each other.

AdvancedCompetitive-programmingGraphs
No solutions yet
Hard

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

AdvancedGraphsHackathonTopological-sort
No solutions yet
Hard

Matrix Chain Multiplication

Find the cheapest order to multiply a chain of matrices.

AdvancedCompetitive-programmingDynamic-programming
No solutions yet
Hard

Minimum Window Substring

Find the shortest piece of text containing all required characters.

AdvancedCompetitive-programmingSliding-windowStrings
No solutions yet

Introduction

This online HTML encoder tool helps you convert characters into HTML entities. It’s a simple and efficient way to handle reserved or special characters in your HTML code.

How to Use This Tool

  1. Paste your HTML code directly into the editor or type it in.
  2. Click the Encode or Decode button to process your HTML.
  3. After encoding or decoding, you can:
    • Download the processed result.
    • Save or share it using a unique link.
    • Sign in with Google or GitHub to save your results for future use.

What is an HTML Entity?

An HTML entity is a piece of text that starts with an ampersand (&) and ends with a semicolon (;). Entities are commonly used to display reserved characters, like < or >, which would otherwise be interpreted as HTML code. They can also represent invisible characters (e.g., non-breaking spaces) or special characters that are difficult to type on a standard keyboard.

For example:

  • < represents the less-than symbol ("<").
  • & represents the ampersand ("&").

Learn more about HTML entities from this helpful guide .

Some Useful HTML Character Entities

Result Description Entity Name Entity Number
non-breaking space &nbsp; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
" double quotation mark &quot; &#34;
' single quotation mark (apostrophe) &apos; &#39;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
€ euro &euro; &#8364;
© copyright &copy; &#169;
® registered trademark &reg; &#174;

Examples

Before encoded

      
<!doctype html>
<html lang="en">
  <head>
    <title>Hello World!</title>
  </head>
  <body>
    <div id="content">
      <h1 class="title">Hello World!</h1>
    </div>
  </body>
</html>
      
    

After encoded

      
&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;Hello World!&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id=&quot;content&quot;&gt;
      &lt;h1 class=&quot;title&quot;&gt;Hello World!&lt;/h1&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;