HTML Encoder / Decoder
Runs in browserEncode special characters into HTML entities and decode HTML entities back to plain text.
Last updated 08 Apr 2026
Paste text or HTML to encode special characters (&, <, >, ", ') into safe HTML entities, or decode HTML entities back to readable text. Handles named entities (&), decimal (<), and hex (<) formats. Runs in your browser — nothing is uploaded.
How to use
- 1
Choose encode or decode
Select Encode to convert text to HTML entities, or Decode to convert HTML entities back to readable text.
- 2
Paste your content
Paste the HTML, text, or encoded content into the input box.
- 3
Copy the result
The encoded or decoded text appears instantly. Click Copy to send it to your clipboard.
Frequently asked questions
Why encode HTML characters?
What characters are encoded?
What HTML entity formats can be decoded?
Is this safe to use for preventing XSS?
Is my text uploaded anywhere?
The Kordu HTML Encoder/Decoder converts between plain text and HTML entity
notation in both directions. **Encoding** replaces characters that have special
meaning in HTML — ampersands, angle brackets, and quotes — with their safe
entity equivalents. This prevents XSS vulnerabilities when injecting user
content into HTML, and ensures correct display of characters that would
otherwise be interpreted as markup.
**Decoding** converts HTML entities back to their original characters. The
decoder handles all three entity formats: named entities like &, decimal
numeric references like <, and hexadecimal references like <.
Five characters are encoded: `&` → `&`, `<` → `<`, `>` → `>`,
`"` → `"`, `'` → `'`. This is the minimal safe set for HTML encoding.
Common uses: sanitising user input before HTML injection, debugging HTML source
code, safely displaying code snippets in blog posts, and converting encoded
content from APIs or feeds.
All processing runs client-side in your browser. Your text is never uploaded,
stored, or transmitted to any server.
Related tools
URL Encoder/Decoder
Encode or decode URLs and query string components instantly — supports encodeURIComponent, decodeURIComponent, and full URL encoding.
Base64 Encoder/Decoder
Encode text or files to Base64 or decode Base64 strings back to plain text — real-time, fully in your browser.
JSON Formatter
Format, validate, and minify JSON instantly — with configurable indentation, error location, and tree view.
Markdown Preview
Write Markdown and see a live GitHub-flavoured HTML preview side by side — export clean HTML instantly.
Case Converter
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, kebab-case, and more — instantly.