HTML Encoder/Decoder
Encode plain text to HTML entities or decode HTML entities back to plain text.
0 characters
0 characters
Your files are processed locally in your browser and are not uploaded to our servers. Encoding and decoding happen instantly as you type, entirely in your browser — nothing is sent anywhere.
How to use HTML Encoder/Decoder
Switch between Encode and Decode to convert in either direction. Encode mode escapes the markup-significant characters (& < > " ') as you type, with an optional toggle to also turn accented letters, emoji, and other non-ASCII characters into named or numeric entities — useful when you need to decode html character encoder-style output back to something a strict system will accept. Decode mode does the reverse: paste HTML-encoded text and decode html online, right in your browser — no server round-trip, whether you're working with named entities like &amp; or numeric ones like &#39; and &#x27;.
Key features
- Instant client-side encoding/decoding as you type
- Encode tab escapes & < > " ' by default
- Optional toggle to encode all non-ASCII characters as named or numeric entities
- Decode tab supports common named entities plus decimal and hexadecimal numeric entities
- Unrecognized or malformed entities are left untouched rather than guessed
- Live character counters on both input and output
- One-click copy to clipboard
- Swap button to flip direction without retyping
Practical use cases
- Escaping user-generated text before inserting it into raw HTML
- Decoding HTML entities pulled from an API response, RSS feed, or scraped page
- Preparing accented characters or emoji for systems that only accept ASCII
- Checking what a string of numeric or named entities actually renders as
Supported formats
Accepted: html-encode
Limitations
- A hand-written character-mapping table, not the full official HTML5 named character reference (which has over 2,000 entries) — only a common, well-known subset of named entities is supported for decoding
- Unrecognized named entities are left as-is on decode rather than guessed
- Encoding all non-ASCII characters is optional and off by default, so plain accented text is left as readable Unicode unless you turn it on
Frequently asked questions
- Does this tool upload or store my text anywhere?
- No. All encoding and decoding happens locally in your browser using JavaScript. Your text is never transmitted or stored anywhere.
- Which characters get encoded?
- In Encode mode, the five markup-significant characters — & < > " and ' — are always escaped. Turn on "Encode all non-ASCII characters" to also convert accented letters, emoji, and other symbols into named entities (where a common one exists) or numeric entities otherwise.
- What's the difference between named and numeric entities?
- A named entity uses a mnemonic like &amp; or &copy;. A numeric entity encodes the character's Unicode code point directly, either in decimal (&#39;) or hexadecimal (&#x27;) form. Both decode to the same character — decimal and hex are just two ways of writing the same numeric entity.
- What happens with malformed or unrecognized entities on decode?
- Any text that doesn't match the shape of a named entity (&name;) or a numeric entity (&#123; or &#x1A;) is left completely untouched. A named entity that isn't in this tool's supported list is also left as-is rather than guessed at.
- Can I go back and forth between encoded and decoded text?
- Yes — the Swap button moves the current result into the input box and switches tabs, so you can quickly check a round trip or flip direction without retyping anything.
Related tools
Part of Coding Tools