Skip to content
TechToolsHQ
NewsReviewsGuidesTech 101Tech SeriesToolsNewsletter
TechToolsHQ

Independent, research-driven tech coverage — breaking news, in-depth reviews, buying guides, and technical tutorials to help you understand and choose with confidence.

Explore
NewsReviewsGuidesTech 101Tech SeriesFree Tools
Legal
About UsOur AuthorsContact UsPrivacy PolicyTerms of ServiceCopyright & DMCAAffiliate DisclosureEditorial PolicyAdvertise With Us

© 2026 TechToolsHQ. All rights reserved.

Tools / HTML entity encoder & decoder

HTML entity encoder & decoder

Encodes the five characters that matter in HTML — & < > " and ' — in the right order, so ampersands are not double-encoded. Decoding also resolves decimal and hexadecimal numeric references.

Runs entirely in your browser

Loading tool…

About this tool

To display characters like < > & " and ’ as literal text in HTML rather than having the browser interpret them as markup, they must be escaped as entities. This tool encodes those special characters into HTML entities and decodes entities back into plain text.

It escapes the five characters that matter in HTML in the correct order, so ampersands are not double-encoded — a common bug where & becomes &amp;amp; because it was escaped after another character. On decoding it also resolves numeric references, both decimal and hexadecimal, so entities written in any of the standard forms are handled.

It runs in your browser, so nothing is uploaded. Use it to safely show code or user-supplied text on a page, to fix double-encoded content, or to decode entities you have found in HTML source.

Frequently asked questions

Why do I need to escape HTML?
So characters like < and & display as text instead of being interpreted as markup, which prevents broken layouts and cross-site scripting when showing code or user input.
What is double-encoding and how does it avoid it?
Double-encoding turns & into &amp;amp; by escaping the ampersand of an already-escaped entity. The tool encodes the special characters in the right order so this does not happen.
Does it decode numeric entities?
Yes. It resolves decimal and hexadecimal numeric character references as well as named entities.
Is my text uploaded?
No. Encoding and decoding run in your browser.

Enjoying HTML entity encoder & decoder?

TechToolsHQ is an independent, reader-supported tech platform. If this free tool saved you time, solved a problem, or helped your workflow, consider supporting our work. Your support helps us keep our utilities 100% free, private, and ad-free for everyone.

100% optional · Reader supported · Independent researchSupport our work

Related tools

  • JSON formatter & validatorPretty-print, minify and validate JSON, with the real parser error.
  • UUID generatorGenerate version 4 UUIDs in bulk, from your browser’s crypto source.
  • JWT decoderInspect a JSON Web Token’s header, payload and expiry.
  • Number base converterConvert between binary, octal, decimal and hexadecimal.
  • Regex testerTest a regular expression against sample text and see every match.
  • URL slug generatorTurn a title into a clean, lowercase, hyphenated URL slug.

Browse all tools