HTML Entities Encoder / Decoder
Convert special characters to HTML entities and back
Special characters like <, >, & and " need to be escaped as HTML entities (<, >, &, ") when displayed inside HTML. This tool encodes any string to entity form and decodes entities back to their original characters — useful for safely displaying user input or copying code snippets into HTML.
How to encode HTML entities
Enter any string containing characters that need to be HTML-safe.
Encode replaces special characters with entities, decode reverses it.
Use the Copy button to grab the safe HTML string.
Convert text to HTML entities or back to plain characters in one click.
Choose between named entities (&) or numeric (&) output.
Works with emoji and non-Latin characters using numeric character references.
Encoding runs entirely in your browser — no data leaves your device.