HTML Encoder
Escape HTML special characters into entities.
About HTML Encoder
HTML Encoder is a free online tool. Escape characters like < > & and quotes into HTML entities so they display as text instead of being parsed as code. It runs entirely in your browser, so there is nothing to install, no account to create and no watermark added to your result.
How to use HTML Encoder
- Enter or paste your input.
- Press the button to encode.
- Copy the result.
Worked example
The text <b>Hi</b> becomes <b>Hi</b> so a browser shows the tags instead of acting on them.
Tips for best results
- Always escape user-provided text before inserting it into a page to prevent cross-site scripting.
- Everything runs in your browser, so you can use HTML Encoder even on a slow connection once the page has loaded.
Limits to keep in mind
- Encoding is not encryption. Anyone can reverse it, so never use it to protect secrets.
Frequently asked questions
More free developer tools
URL Encoder
Percent-encode URLs for safe transmission.
URL Decoder
Decode percent-encoded URLs back to readable text.
HTML Decoder
Unescape HTML entities back into characters.
MD5 Hash Generator
Generate MD5 hashes from any text.
SHA-1 Hash Generator
Generate SHA-1 hashes from any text.
SHA-256 Hash Generator
Generate secure SHA-256 hashes.
Related guides
UUIDs Explained: Versions, Collisions and How to Generate Them
What a UUID is, how version 4 and version 7 differ, why collisions are practically impossible and how to use them as database keys.
2 minBase64 Explained: What It Is, Why It Exists and What It Is Not
How Base64 turns bytes into text, why it adds about a third to the size, where you will meet it and why it is not encryption.
2 minMD5 vs SHA-256: Which Hash Should You Use?
Understand what hash functions do, why MD5 and SHA-1 are considered broken for security and which tool to use for checksums and passwords.