Convert Unicode to HTML
Convert Unicode to HTML entities (hex/decimal/named/smart) with ASCII-safe option. Reverse direction parses all formats. Free, offline, client-side, secure.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Convert Unicode characters to HTML entities in 4 modes: hex (A), decimal (A), named (© when available), or smart (named when possible, numeric otherwise). ASCII-safe option preserves plain ASCII so output stays readable. Reverse direction parses all formats.
Per-character breakdown
How to Use Convert Unicode to HTML
- Paste your text. Anything Unicode. Codepoint iteration handles emoji and supplementary characters correctly.
- Pick a mode. Smart (default): named when available, hex otherwise. Hex/Decimal: always numeric. Named: prefer named, hex fallback.
- Toggle ASCII-safe. On (default): printable ASCII stays unchanged. Off: every char becomes an entity. HTML-unsafe chars (
< > & " ') always converted regardless. - Read the per-character grid. Char, codepoint, output entity, type. Color-coded for quick scanning.
- Swap to decode. Handles all three formats - named, hex, decimal - plus plain text passthrough.
- Batch mode. Multi-line input → TSV.
Frequently Asked Questions
How many named entities does the tool know?
About 250 of the most common HTML5 named entities – HTML-unsafe (<, >, etc.), Latin-1 supplement, common punctuation (em dash, ellipsis, smart quotes), Greek letters, math symbols, arrows. Characters without a named entity fall back to hex.
What does ASCII-safe preserve?
Printable ASCII (codepoints 32-126) stays unchanged. Control characters (0-31) and DEL (127) still get converted. The 5 HTML-unsafe characters are always converted regardless.
What’s Smart mode?
Named entity if one exists (© is clearer than ©), else numeric hex. Best for human-readable output.
Why are some characters always converted?
The 5 HTML-unsafe chars (< > & " ') have syntactic meaning in HTML. Leaving them un-escaped is the classic XSS vector.
How does decode handle unknown named entities?
Passes them through unchanged. Safer than throwing – your output preserves the original text intent.
What if my text has entity-like patterns?
The decode regex matches &#xNN; / &#NN; / &name; specifically. R&D (no semicolon) stays as-is.
Can I use this for SVG or XML?
Yes. Same syntax. For XML compatibility use hex/decimal (only 5 named entities are XML-standard).
How does it handle emoji?
Properly via codepoint iteration. 😀 (U+1F600) → 😀.
Is my text uploaded?
No. The conversion runs entirely in your browser – nothing is sent to a server, logged, or stored, and the tool keeps working offline once the page has loaded.
Works offline?
Yes. The whole tool weighs about 22 KB, so once the page has loaded it runs without any network connection – every conversion happens locally in JavaScript on your device.
Related Tools
Center Unicode Text →
Center Unicode text within a fixed width, with real grapheme counting for emoji and…
Check Spoofed Unicode Text →
Detect Unicode confusables and homoglyphs from Cyrillic, Greek, Armenian, and Hebrew that imitate Latin…
Chunkify Unicode Text →
Split Unicode text into equal chunks with grapheme, code-point, or UTF-16 modes. Keeps emoji…
ASCII to Unicode Converter →
ASCII to Unicode & Decode decimal, hex, octal, or U+XXXX values to Unicode characters…
Convert Code Points to Unicode →
Convert Code Points to Unicode (U+XXXX, hex, decimal) to characters - handles emoji, CJK,…
Convert Unicode to ASCII →
Convert Unicode to ASCII with transliteration (é → e, ñ → n), replace, or…
Convert Unicode to Base64 →
Encode Unicode text to Base64 (and decode) with standard, URL-safe, MIME variants. UTF-8 proper.…
Convert Unicode to Binary →
Convert Unicode to binary in 3 modes (UTF-8, codepoint, UTF-16). Per-character breakdown. Free, offline,…
Convert Unicode to Bytes →
Convert Unicode to UTF-8 bytes in hex, decimal, or binary. Per-byte grid, reverse direction.…
Convert Unicode to Code Points →
Convert Unicode to code points (U+XXXX, HTML/CSS/JS escapes) and back. Per-character breakdown. Free, offline,…
Convert Unicode to Data URL →
Convert Unicode to data URLs with base64 or URL-encoding, 12 MIME types, charset toggle.…
Convert Unicode to Decimal →
Convert Unicode text to decimal code point values.