HTML Entities Encoder / Decoder
Convert & to & and back. Optionally escape every non-ASCII character.
Loading…
Runs entirely in your browser. Nothing you enter is uploaded or stored on a server.
About this tool
The characters <, > and & carry structural meaning in HTML, so showing them as text means converting them to entities — otherwise the page breaks or an injection door opens. This tool converts both ways and can escape non-Latin characters for older systems that accept only ASCII.
How to use
- 1Paste the text or HTML.
- 2Choose encode or decode.
- 3Turn on non-ASCII encoding if you need it.
When you need it
- Showing a code snippet in a page without it being executed.
- Passing Arabic text through a legacy system limited to ASCII.
- Cleaning text copied from an editor that curls quotes automatically.
Frequently asked questions
Which characters need encoding?
In text: <, > and &. Inside an attribute value add " and '. Escaping those few prevents most structural breakage.
Does encoding protect against XSS?
Output encoding is a core part of the defence but not all of it. Context decides: text in a page differs from an attribute value, which differs from inside a script tag. Rely on your framework rather than hand-rolled escaping.
Should I encode Arabic letters?
Not while the page is UTF-8, which every modern site is. Encoding them only helps with legacy systems that require ASCII.
Related tools
- Base64 Encoder / DecoderConvert text to Base64 and back. Handles Arabic and any Unicode text correctly.
- JSON Formatter & ValidatorFormat, minify and validate JSON. Errors point to the exact position.
- URL Encoder / DecoderPercent-encode and decode URLs, and split a query string into readable lines.
- Unicode Escape / UnescapeTurn Arabic and any Unicode text into \u escapes and back. Essential for JSON and source files.
- JWT DecoderDecode a JSON Web Token and read its header, payload and expiry.
- UUID GeneratorGenerate UUID v4 and v7 identifiers, one at a time or in bulk.