HTML Encoder and Decoder
Encode or decode HTML entities.
Overview
Converts characters that have special meaning in HTML into their safe entity form, and back again. This is how you display symbols like a less-than sign as text instead of having the browser treat it as a tag. It runs in your browser.
How it works
Certain characters, such as less-than, greater-than, ampersand, and quotation marks, control how HTML is parsed. The tool replaces them with named entities (for example, less-than becomes <) so they render as visible text rather than being interpreted as markup. Decoding turns the entities back into the original characters. This is useful for showing code snippets and for safely displaying text that came from a user.
How to use it
- Choose encode or decode.
- Paste your text or HTML-encoded string.
- Read the converted result.
- Copy it into your page or template.
Examples
Encoding
The snippet <b>Hi</b> becomes <b>Hi</b>, so it shows as text instead of bolding "Hi".
Decoding
Paste entity-encoded text to recover the original characters.
FAQ
Why encode HTML?
Which characters need encoding?
Does this prevent injection?
Is my data sent anywhere?
Related tools
JSON Formatter
Format, validate, beautify, and minify JSON.
Open toolBase64 Encoder and Decoder
Encode text to Base64 or decode it back.
Open toolPassword Generator
Generate strong random passwords with length and character options.
Open toolUUID Generator
Generate v4 UUIDs in bulk.
Open toolURL Encoder and Decoder
URL-encode or decode percent-encoded strings.
Open toolEmbed this tool
Paste this snippet to put the tool on your own site. It runs entirely in the visitor's browser, the same as it does here.