Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

HTML Encode and Decode

HTML Encode and Decode writes the characters < > & and quotes as HTML entities, or reads entities back into characters. It runs in your browser.

How to use HTML Encode and Decode online

  1. Choose encode or decode. Pick what to do from the list.
  2. Paste your text. Type or paste into the box.
  3. Set the option. When encoding, tick the box if you want every non-ASCII character as a number.
  4. Copy the result. Copy the text from the result box.

Why use this free HTML Encode and Decode

  • Encode and decode
  • Named and numeric entities
  • Decimal and hexadecimal numbers
  • Optional numbers for non-ASCII text
  • Unknown names left alone
  • Nothing sent, nothing stored

Why entities exist

In HTML, the characters < and & have a special meaning. To show them as text, you write them as entities: < for the less-than sign and & for the ampersand. Quotation marks need the same care inside attribute values. This tool does the swap for you, so a snippet of code or a sentence with an ampersand displays as written.

Encoding

Encoding changes five characters: the ampersand, less-than, greater-than, double quote and apostrophe. Everything else is left alone. If your file is not saved with Unicode encoding, or you must work with a system that only takes plain ASCII, tick the option to write every character above code 127 as a number. Then é is written é and the euro sign €.

Decoding

Decoding turns entities back into characters. It understands numbers in decimal, such as é, and in hexadecimal, such as é, as well as a short list of common names, such as  , ©, € and —. An entity the tool does not know is left exactly as you typed it, rather than guessed. The same goes for numbers that are not real characters.

Round trips

Encoding and then decoding gives your original text back. The page does not change spaces or line breaks. Keep in mind that encoding text is only one part of writing safe web pages. It does not replace the checks your framework does for you.

HTML Encode and Decode: frequently asked questions

Which characters are encoded?
The ampersand, less-than, greater-than, double quote and apostrophe. Optionally every non-ASCII character too.
Why is the apostrophe written as a number?
&#39; works in every HTML version, while the name &apos; is not valid in older ones.
Which named entities can it decode?
A short list of common ones, such as nbsp, copy, euro and mdash. Others are left as typed.
What does the non-ASCII option do?
It writes every character above code 127 as a number such as &#233;.
Does it change line breaks?
No. Spaces and line breaks stay as they are.
Do my snippets leave the page?
No. The conversion happens in your browser and nothing is kept.

Related searches for HTML Encode and Decode

  • HTML Encode and Decode online
  • free HTML Encode and Decode
  • HTML Encode and Decode online free
  • HTML Encode and Decode for mobile
  • HTML Encode and Decode without sign up
  • HTML Encode and Decode – Text & Developer Tools

HTML Encode and Decode is a free online tool on MAITBOX, in the Text & Developer Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.

More tools in Text & Developer Tools →

Search tools