HTML Entities Encoder
Encoding & CryptoBase64, MD5/SHA/HMAC hashes, JWT decoder, URL query parser, and HTML entities — 100% client-side.
100% client-side — files and inputs never leave your browser.
About this tool and how it works
Escaping text for HTML
Characters such as <, >, &, and quotes have special meaning in HTML. To display them as text — in a code sample, a CMS field, or an email template — they must be written as entities: named (<), decimal (<), or hexadecimal (<). This tool converts in both directions.
When to encode
- Publishing code snippets on a blog or documentation page, so
<div>is shown instead of rendered. - Pasting text into legacy systems or XML feeds that reject raw non-ASCII characters (encode accents as numeric entities).
- Inspecting user-generated content that arrived already escaped, e.g.
Tom & Jerryafter double encoding.
Entities and XSS
Escaping < > & " ' before inserting untrusted text into HTML is the core defence against cross-site scripting. Modern frameworks (React, Astro, Vue) do this automatically for text content; risk appears when you bypass them with innerHTML, dangerouslySetInnerHTML, or string-built templates. Note that HTML escaping is not enough inside JavaScript strings, URLs, or CSS — each context needs its own encoding.
Example
5 < 6 && "ok" encodes to 5 < 6 && "ok". Decoding reverses it, including numeric forms such as é (é) and 😀 (😀).
Frequently asked questions
Named, decimal, or hex entities — which should I use?
They render identically. Named entities are easiest to read; numeric entities work for every Unicode character, including those without a name, and are safest for XML.
Why do I see &amp; on my page?
The text was escaped twice. Decode it once here to check, then remove the extra escaping step in your template or API.
Do I need to encode accented letters like é in UTF-8 pages?
No. If the page declares <meta charset="utf-8">, accented characters can be written directly. Encode them only for systems limited to ASCII.
Other tools
Encode and decode UTF-8 text, URL-safe Base64, and image Data URIs.
Generate MD5, SHA-1, SHA-256, SHA-384, SHA-512, HMAC, and file checksums.
Inspect JWT headers, payloads, claims, and expiration timestamps locally.
Encode/decode URLs and convert query parameters to and from JSON.
Create direct wa.me links with pre-filled messages and downloadable PNG QR codes.
Merge, split, compress, rotate pages, and convert between PDF and images 100% locally.
Shrink and convert JPG, PNG, and WebP images locally in your browser without uploading.
Inspect hidden GPS coordinates, author, company, revisions, and XMP metadata locally in your browser.
Convert length, weight, temperature, volume, area, speed, data size, and time instantly.