HTML Encode/Decode

Convert all applicable characters to HTML entities, or vice versa

Tags: decoder encoder html html encode/decode

🚀 315,097 total conversions (7 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

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

You'll learn ArithmeticReturn values
BeginnerLearning-pathVariables
Easy

Dot Product of Two Vectors

Multiply two vectors element by element and add the results: the core operation of every neuron.

You'll learn VectorsDot product
Neural networksaimachine learning
Easy

Distance Between Points

Compute the straight-line distance between two points.

You'll learn Pythagorean theoremSquare roots
BeginnerFunctionsLearning-pathmath
Easy

Average of Three

Average three whole numbers.

You'll learn ArithmeticDivision
BeginnerLearning-pathVariables
Easy

To-Do List

Keep a list of tasks: add them, mark them done, remove them and report what is still pending.

You'll learn Typed collectionsRecords
BeginnerSimulationStrings
Easy

Prime Number Check

Decide whether a number is prime.

You'll learn DivisibilityLoop optimization
BeginnerLoopsNumbersStudent-beginner
Easy

Days in a Month

Return how many days a month has, including leap years.

You'll learn Calendar rulesHelper functions
BeginnerConditionsFunctionsLearning-path
Easy

Count Pairs With a Sum

Count pairs of positions whose values add up to a target.

You'll learn Pairs of indexesAvoiding double counts
ArraysBeginnerLearning-pathNested-loops
Easy

Min and Max Together

Find the smallest and largest value in one pass.

You'll learn Single passMultiple return values
ArraysBeginnerFunctionsLearning-path
Easy

Hollow Square

Draw the outline of a square with * characters.

You'll learn Edge detectionBuilding strings
BeginnerLearning-pathNested-loopsPatterns
Easy

Number Triangle

Build a triangle of increasing numbers.

You'll learn Growing rowsCounters across rows
BeginnerLearning-pathNested-loopsPatterns
Easy

Pyramid Rows

Draw a right-aligned pyramid of # blocks.

You'll learn String patternsPadding
BeginnerLearning-pathNested-loopsPatterns

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;