Santekno/toolsCategoriesTutorials

HTML Encode / Decode

Encode and decode HTML entities. Supports named refs (&) and numeric refs (&, &).

Processed in your browserUpdated · Jan 2026
Input
0 chars
Output
0 chars

How to use HTML Encode / Decode

Paste your input on the left, choose the options you want, and the output appears instantly on the right. Everything runs in your browser — none of your data is sent to a server.

  • Paste or type your input in the INPUT panel
  • The output regenerates automatically as you type
  • Use Copy to put the result in your clipboard
  • Click Sample to load a working example

What is HTML Encode / Decode?

HTML Encode/Decode converts characters to and from HTML entity references. Encode mode escapes the five "must escape" characters (& < > " ') plus common typographic characters (© ™ —). Numeric-refs-only mode emits `&#NNN;` decimal entities for everything non-ASCII — handy when targeting environments that may not support named refs. Decode mode parses both named (`&amp;`) and numeric (`&#38;`, `&#x26;`) forms back to the original characters. This tool is part of santekno's developer toolbox — a curated collection of utilities built for engineers who care about speed, privacy, and simplicity.

Common use cases

  • Debugging API payloads and integration issues
  • Inspecting tokens, hashes, or encoded strings during development
  • Generating fixtures and sample data for tests
  • Sharing readable output with teammates in code reviews

FAQ

In HTML body: `&`, `<`, `>`. In attribute values, also `"` and `'`. Forgetting these is the #1 source of XSS bugs.