HTML Encoder
Paste text to convert characters that HTML treats as markup into safe entities. The result is generated locally and is ready to copy into source code.
- Direction
- Entities
- 7
- Length
- 50
- Policy
Encoding with names: the five markup characters and everything outside plain ASCII are written as references, using the HTML name where there is one and a number where there is not. Every other character is left as it was.
Worked examples
Type in either box: editing the entities side decodes, editing the text side encodes. Swap sends the text you have to the other box, which is the fix for a paste that went in the wrong one. Positions count characters from the start of the box, beginning at 1, and an emoji counts as one character.
Common questions
- Does this run in my browser?
- Yes. The page performs the core transformation in your browser and explains the result before you copy or download it.
Decoding is done by an inert parser that never runs the markup, and the result is always text rather than something the page renders. Encoding covers the characters you choose, and every other character is left exactly as it was.