とは
HTML エンティティ エンコーダー / デコーダー とは?
The HTML Entity Encoder/Decoder converts special characters into their HTML entity equivalents (encoding) or reverses the process (decoding). Encoding is essential for safely displaying user-generated content in HTML, preventing XSS attacks, and embedding special characters in HTML attributes. Decoding is useful when you receive escaped HTML and need to read or process the raw text.
The tool includes a quick-reference table of the most commonly needed entities — <, >, &, ", ©, , and more — so you don't have to memorize them. Switch between encode and decode modes with one click, or use "Swap & Flip" to chain the output back into the input for round-trip testing.
の使い方
HTML エンティティ エンコーダー / デコーダー の使い方
1. Choose "Encode" or "Decode" mode from the toggle.
2. Paste your text into the left panel. The result appears in the right panel immediately.
3. Click "Swap & Flip" to send the result back to the input and switch modes — useful for round-trip verification.
4. Click "Copy Result" to copy the output.
5. Click "Load Example" to prefill a sample appropriate for the current mode.
6. Use the Quick Reference table at the bottom to look up common entities.
使用例
使用例
Encode mode input:
<div class="greeting">Hello "World" & <Friends></div>
Encoded output:
<div class="greeting">Hello "World" & <Friends></div>
Decode mode — paste the encoded version back to recover the original HTML.主な使用シーン
主な使用シーン
1. XSS prevention: Encode user input before inserting it into HTML to prevent injection attacks.
2. HTML template authoring: Encode special characters in CMS content or email templates that don't support raw HTML.
3. API response inspection: Decode entity-encoded strings in API responses or XML feeds to read the actual content.
4. Email HTML: Encode special characters that mail clients may misinterpret as HTML tags.
5. Documentation writing: Encode code snippets containing angle brackets for display in HTML documentation.
よくある質問