HTML Entity Encoder and Decoder
Paste text or entity-encoded markup and convert it either direction: escape the characters that are meaningful in HTML, or decode named and numeric entities back to plain text. Nothing is sent anywhere.
HTML Entity Encoder and Decoder
Drop your text or HTML file here
Up to 20MB per file. Stays on this device.
Nothing is sent anywhere. Turn off your Wi-Fi and this page still works - try it.
How it works
- Drop or choose a .txt/.html file, or paste text directly into the box.
- Pick Encode or Decode. When encoding, choose a scope and an entity format - the result updates immediately as you change either.
- Copy the result to your clipboard, or download it as a .txt file.
Input
Tom & Jerry's café <b>bold</b> "quote"
Output
Tom & Jerry's café <b>bold</b> "quote"Only the five HTML-significant characters are escaped by default; café’s accented letter is left as-is unless you turn on "encode all non-ASCII characters".
Frequently asked questions
Is my text sent anywhere?
No. Pasted text and uploaded files are both read entirely on your device - nothing is sent to a server. Turn off your Wi-Fi after the page loads and it still works. This page loads 11KB of JavaScript, gzipped - about what your browser's network tab will show for this page's own scripts.
What exactly gets encoded?
By default, only the five characters that are meaningful in HTML markup: &, <, >, ", and '. Turn on “Also encode accented letters, symbols, and emoji” to convert every character above plain ASCII too - useful when you need output that only ever contains ASCII bytes.
Which entity format does the encoder use?
Choose from three: a named entity where one exists for that character (©), a numeric decimal entity (©), or a numeric hex entity (©). A character with no matching named entity always falls back to its numeric form, even in named mode.
What happens to an entity the decoder doesn’t recognize?
It’s left exactly as it appeared in the input, unchanged - the decoder never guesses at malformed or unknown markup. That covers a misspelled named entity and a numeric entity outside the valid Unicode range alike.
Is decoded output ever rendered as live HTML?
No. The decoded result is always shown and downloaded as plain text. If it contains something that looks like a tag - decoding <script> produces the literal text <script> - that text is displayed as text, never executed or inserted as markup.
Files are processed locally in your browser and never uploaded. Read more on the privacy page.