Free HTML Encoder & Decoder Online
A free online HTML encoder and decoder: turn HTML into entities and back — instant, private.
Free tool · No sign-up · Private
Formats & limits
What this tool handles
Straightforward limits, stated plainly.
Safe encoding
Encodes the five characters that matter for safety: & < > " and '. Everything else — including Unicode text — passes through untouched.
Named + numeric decode
Decodes named entities like © and , decimal codes like ©, and hex codes like ©. Unknown entities are left as-is.
Live conversion
No buttons to press. The output updates with every keystroke, so you can experiment and learn what each character becomes.
Any length
Paste a snippet or a whole document — there's no practical input size limit for text conversion.
How it works
Three steps to escaped
Choose encode or decode
Pick Encode to escape HTML into entities, or Decode to turn < & " style codes back into plain characters.
Paste your text
Drop in HTML markup, a code snippet, or entity-filled text. The result converts live as you type.
Copy the result
One click copies the output — paste it straight into your editor, CMS, or database field.
Use cases
When entity encoding helps
Display code on a page
Writing a tutorial with <div> examples? Encode the snippet so browsers show it as text instead of rendering it.
Prevent XSS
Encoding user input before inserting it into a page is the first line of defense against cross-site scripting.
Clean scraped text
Copied content full of & and codes? Decode it to get plain text for your notes or database.
Email templates
Email HTML is picky about special characters in subject lines and preheaders. Encode them to avoid mangled output.
CMS migrations
Moving content between systems often double-encodes entities. Decode to normalize everything back to plain characters.
FAQ
HTML entity questions
What are HTML entities?
Why do I need to encode HTML?
What's the difference between named and numeric entities?
When do I need the decoder?
Is anything I paste uploaded?
What characters get encoded?
Keep exploring
Related tools
Write Markdown, get clean HTML with a live preview.
Open tool →FreeTurn messy HTML into clean, readable Markdown.
Open tool →FreeEncode text to Base64, decode it back, or turn files into data URIs.
Open tool →For developers
Need this programmatically?
YATools also exposes simple REST APIs for screenshots, audio, documents, and more — free tier included.