Base64 Encoder / Decoder
Encode binary or file content as Base64 for safe transport in data URIs, API payloads, or email templates — the encoding complement to HTML entity conversion.
Open toolHome › Tools › Developer Tools › HTML Entity Encoder / Decoder
Encode HTML special characters — <, >, &, ", ' — to safe HTML entities, or decode entities back to plain text. Instant client-side conversion. Common use cases: CMS content, email templates, code snippets. 100% in-browser, nothing stored.
HTML Entity Encoder / Decoder converts between plain text and HTML entity notation instantly in your browser. Paste text in the INPUT panel and the encoded output appears in the OUTPUT panel with zero delay — no button click, no server round-trip, no data sent anywhere.
Two scopes are available. HTML-safe only encodes the five characters that break HTML structure: & < > " and '. The ampersand is encoded first to prevent double-encoding. This scope is the right choice for the vast majority of use cases — CMS content, code snippets, email template bodies, and API response values that will be rendered inside HTML.
All non-ASCII encodes the same five HTML-structural characters first, then additionally converts every character with a Unicode code point above U+007E (tilde) to a numeric HTML entity (&#charCode;). Use this scope when the target environment requires strict ASCII output — legacy email systems, certain CMS fields, or HTTP headers where non-ASCII bytes can cause encoding issues.
The decoder uses the browser's own HTML parser via the textarea trick: the encoded string is assigned to a textarea element's value property and read back as text. This handles all named entities ( , ©, €, —), numeric decimal entities ( ), and numeric hexadecimal entities (©) correctly and safely. No innerHTML assignment is used, so there is no risk of script execution when decoding content that contains <script> tags as entities.
Input is capped at 100 KB. For larger documents, split the content into sections. All conversion happens synchronously in JavaScript — no background processing, no waiting.
HTML-safe only encodes the five characters that break HTML structure (< > & " '). This is correct for the vast majority of use cases. Use All non-ASCII when the target system requires strict 7-bit ASCII output — for example, legacy email clients that do not support multi-byte characters, or XML parsers with strict encoding requirements.
Yes, in Decode mode. The decoder uses the browser's native HTML parser, which resolves all named entities (including , ©, €, —, and the full HTML5 named character reference list) correctly. Encode mode only produces named entities for the five HTML-structural characters and numeric entities for everything else.
Yes. The decoder uses a textarea element trick (assigning the encoded string to textarea.value and reading back the plain text) rather than innerHTML assignment. The browser performs entity resolution without parsing or executing any HTML, so encoded script tags decode to plain text, not executable code.
No. All encoding and decoding runs in JavaScript entirely within your browser. Nothing is uploaded or stored. You can encode sensitive content — API keys, passwords, private documents — without any data leaving your device.
Input is capped at 100 KB (approximately 100,000 characters). For larger documents, split the content into sections and encode each section separately.
Keep going
Encode binary or file content as Base64 for safe transport in data URIs, API payloads, or email templates — the encoding complement to HTML entity conversion.
Open toolPercent-encode URLs and query string values — use alongside HTML entity encoding when building safe links inside HTML attributes.
Open toolTranslate text to binary and back — covers the ASCII range that HTML-safe encoding also protects, useful for understanding character encoding at the byte level.
Open toolFormat and validate JSON that may contain encoded HTML entities — confirm structure and entity values are correct before embedding in API responses or documentation.
Open tool