HTML entity encoder / decoder
Escape text into HTML entities so it shows literally in a page (and can’t break your markup), or decode entities back to plain text. Optionally numeric-encode every non-ASCII character too. Live as you type, fully offline.
Open HTML entity encoder / decoder →What is the HTML entity encoder / decoder?
A two-way tool that escapes text into HTML entities so it shows literally on a page and can't break your markup, or decodes entities back to plain text. You can optionally numeric-encode every non-ASCII character too. It converts live as you type and runs entirely in your browser, offline.
How to use HTML entity encoder / decoder
- Choose Encode or Decode — Use the Encode / Decode toggle depending on whether you're escaping text or turning entities back into plain text.
- Type or paste your text — Enter your text or markup into the input box. The result appears underneath as you type.
- Optionally encode non-ASCII — In Encode mode, tick "Also encode all non-ASCII" to convert accented and other non-ASCII characters into numeric entities.
- Copy the result — Use the Copy result action in the header to put the converted text on your clipboard.
Frequently asked questions
Which characters get escaped when encoding?
The core HTML-significant characters — &, <, >, double quote and single quote — are turned into named entities so your text can't break surrounding markup.
What does "Also encode all non-ASCII" do?
It additionally converts every character above the basic ASCII range into a numeric entity, which is useful when a system can only handle plain ASCII.
Is decoding safe — could it run a script?
No. Decoding uses a textarea so entities are turned back into text without any tags being executed, so pasted markup won't run.
Does my text get uploaded?
No. Encoding and decoding happen entirely in your browser, so your text never leaves your device and the tool works offline.
Can I round-trip text?
Yes. Text you encode can be pasted back in Decode mode to recover the original, which is handy for checking a snippet.
Tips
- Encode user-supplied text before dropping it into HTML so angle brackets and ampersands display literally.
- Leave the non-ASCII option off for normal web pages — UTF-8 handles those characters fine.
- Use Decode to read what an escaped snippet from a log or config file actually says.