HTML Entity Encode / Decode
Encode HTML special characters to entities or decode entities back to text. Handles named, decimal, and hex entities.
๐ง
HTML Entities is coming soon. In the meantime, try the JSON โ CSV converter, which has flattening built in.
How it works
Named + numeric entity support
Encodes 28 named entities (&, <, ©, €โฆ) and converts any non-ASCII character to a numeric entity. Decodes named, decimal (<), and hex (<) entities on input.
Example
Encoding HTML tags for safe display in a code block
Input
<script>alert("XSS")</script>Output
<script>alert("XSS")</script>
Encoded output renders as literal text โ the script is displayed, not executed.
Frequently asked questions
Which characters must be HTML-encoded?
Minimum required: & โ &, < โ <, > โ >. In attribute values: " โ ". Non-ASCII characters are optional in UTF-8 documents.
Related Tools
TOOL
Base64Decode base64 strings to text or JSON, or encode any text to base64. Handles URL-safe base64 and missing padding.TOOL
URL EncodePercent-encode URLs and query parameters, or decode encoded strings back to readable text. Updates as you type.TOOL
Format JSONPaste compact JSON and make it readable, or paste pretty-printed JSON and compact it for production.TOOL
Hash GeneratorGenerate SHA-1, SHA-256, SHA-384, or SHA-512 hashes from any text. Uses the Web Crypto API โ nothing leaves your browser.All conversions run in your browser โ nothing is uploaded.
Browse all 27 converters โ