HTML Encoder
0 / 200,000 characters
HTML encoder & HTML entities decoder
Escape or unescape HTML entities in your browser. Toolshelf turns & into & (and back) without uploading the snippet.
What you can do
- Encode & < > quotes to HTML named entities
- Optional numeric hex or decimal entities
- Decode named, decimal, and hex entities including emoji
- Smart encode that does not turn & into &amp;
- Optional non-ASCII numeric encoding
- Copy or download as plain text — output is not rendered as HTML
- Draft stays in this tab; nothing is uploaded
Named vs numeric entities
Named entities such as < are easier to read. Numeric forms (😀) cover characters we do not keep in the named table, including emoji. This encoder is not a replacement for the URL encoder or the HTML formatter.
HTML encoder FAQ
- What is an HTML encoder?
- An HTML encoder (HTML entities encoder) replaces characters such as & < > " with entity references so the text can sit in HTML source without being treated as markup.
- How do I decode HTML entities?
- Switch to Decode. Named entities in our table, plus { and 😀, become Unicode text. Unknown names stay as they are and are counted.
- Is HTML escaping a sanitizer?
- No. Escaping a string is not the same as sanitizing HTML you will insert with innerHTML. This page never renders your input as HTML.
- What is the difference from URL encoding?
- URL encoding uses percent sequences (%20). HTML entities use & and numeric references. Use the URL encoder for query strings.
- Does this cover every HTML5 named entity?
- No. The named set is the XML five plus a documented Latin-1 and punctuation subset. Other characters can still be encoded as numeric entities.
- Do you upload my HTML?
- No. Toolshelf encodes and decodes in the browser. A draft can stay in this tab’s session storage.
- Do I need an account?
- No. Toolshelf HTML Encoder requires no account.
Related tools
Continue with related browser-based tools on Toolshelf.
- URL Encoder & Decoder — Online URL encoder and decoder.
- Base64 Encoder & Decoder — Online Base64 encoder and decoder.
- Code Formatter & Beautifier — Online code formatter and beautifier.
- Markdown Editor & Preview — Online Markdown editor with live preview.
- Image to Base64 Converter — Image to Base64 converter.
- Hash Generator — Online hash generator.
- AES Encrypt Decrypt — AES encrypt decrypt online.
Examples
Escape a price string
Price < 5 & "ok" becomes Price < 5 & "ok".
Limitations
- Named entities are a documented subset, not every HTML5 name.
- Escaping is not an XSS sanitizer.
What would you like to do next?
Continue working with the next step in this workflow. Recently used tools in this set are listed first.
- URL Encoder & Decoder — Online URL encoder and decoder.
- Base64 Encoder & Decoder — Online Base64 encoder and decoder.
- Code Formatter & Beautifier — Online code formatter and beautifier.
- Markdown Editor & Preview — Online Markdown editor with live preview.
You may also need
Continue with related browser-based tools on Toolshelf.
- URL Encoder & Decoder — Online URL encoder and decoder.
- Base64 Encoder & Decoder — Online Base64 encoder and decoder.
- Code Formatter & Beautifier — Online code formatter and beautifier.
- Markdown Editor & Preview — Online Markdown editor with live preview.
- Image to Base64 Converter — Image to Base64 converter.
- Hash Generator — Online hash generator.
- AES Encrypt Decrypt — AES encrypt decrypt online.