Encode
- Input
- <script>
- Expected output
- <script>
Prevents interpretation as a tag.
html entity encoder
Some characters have special meaning inside HTML, "<" opens a tag, "&" starts an entity. HTML entities let you display those characters as literal text, without the browser interpreting them as markup.
Prevents interpretation as a tag.
Named and numeric.
Select the Binary format, keep the direction on Text → Code and type your text. Each character becomes an 8-bit group (for example, 'A' becomes 01000001), separated by spaces. For the reverse, paste the binary and switch the direction to Code → Text, it works with space-separated groups or with one continuous run of bits.
"<" starts a tag and "&" starts an entity, if either character appears literally in displayed text without escaping, the browser may interpret it as markup, breaking the layout or, worst case, allowing malicious code injection.
Named entities (&, ©) are easy-to-read mnemonics for common characters; numeric entities (& or &) use the Unicode code point directly, decimal or hexadecimal, and cover any character, even ones with no defined name.
No. This converter escapes characters for safely displaying plain text; to sanitize arbitrary HTML that may contain malicious tags and attributes, use a dedicated sanitization library in your backend or frontend.
All translation happens in your browser. No text is ever sent to a server, safe for passwords, tokens and sensitive data.