HTML Entity Encoder & Decoder
Encode text into HTML entities or decode entities back into text. Free, private, and fully client-side.
HTML Entity Encoder & Decoder converts text into HTML entities (named, decimal, or hexadecimal) and decodes HTML entities back into readable text, directly in your browser. Handles the core HTML-safe characters plus an extended set of common named entities and full Unicode. No upload, no account. Made by FreeToolHub.
Text
Entity output
HTML entities
Decoded text
Convert between text and HTML entities instantly in your browser.
Frequently Asked Questions
What is HTML entity encoding?
HTML entity encoding replaces characters that have special meaning in HTML — like &, <, >, " and ' — with escape sequences such as &, <, and > so browsers display them as literal text instead of interpreting them as markup.
Is my text uploaded anywhere?
No. All encoding and decoding happens locally in your browser using JavaScript. Your text is never sent to any server, so you can safely convert private snippets or code.
What is the difference between named, decimal, and hexadecimal entities?
Named entities use a readable name like & or ©. Decimal entities use a numeric code point like &. Hexadecimal entities use a hex code point like &. All three render identically in a browser; named entities are easier to read in source code.
What does "Encode all non-ASCII characters" do?
By default only the five HTML-unsafe characters (&, <, >, ", ') are encoded. Turning this option on also encodes every character outside the basic ASCII range, such as accented letters, symbols, and emoji, which is useful when a document must be sent through systems that only support plain ASCII.
Why should I encode HTML entities before inserting user text into a page?
Inserting raw user input into HTML without encoding can let someone submit a string like <script> that the browser then executes, a common cross-site scripting (XSS) vulnerability. Encoding the unsafe characters first makes sure the text is always displayed, never executed.
Is this tool free to use?
Yes, this HTML entity encoder and decoder is 100% free with no limits, no sign-up, and no ads.