Free2BoxFree2Box

HTMLエンティティ エンコーダー / デコーダー

特殊文字をHTMLエンティティにエンコードまたはデコード

入力
出力
結果がここに表示されます...
一般的なHTMLエンティティ
文字エンティティ (Named)エンティティ (Numeric)名前
&&&Ampersand
<&lt;&#60;Less Than
>&gt;&#62;Greater Than
"&quot;&#34;Double Quote
'&#39;&#39;Apostrophe
&nbsp;&#160;Non-breaking Space
©&copy;&#169;Copyright
®&reg;&#174;Registered
&trade;&#8482;Trademark
&euro;&#8364;Euro
£&pound;&#163;Pound
¥&yen;&#165;Yen
«&laquo;&#171;Left Guillemet
»&raquo;&#187;Right Guillemet
&mdash;&#8212;Em Dash
&ndash;&#8211;En Dash
&hellip;&#8230;Ellipsis
·&middot;&#183;Middle Dot
&bull;&#8226;Bullet
×&times;&#215;Multiplication
÷&divide;&#247;Division

使い方

1

テキストを貼り付けまたは入力

テキスト、コード、またはデータを入力エリアに入力します。

2

オプションを選択

適用する変換やフォーマットを選択します。

3

結果をコピー

ワンクリックで出力をクリップボードにコピーします。

このツールを使う理由

完全無料

隠れたコストもプレミアムプランもありません — すべての機能が無料です。

インストール不要

すべてブラウザで実行されます。ソフトウェアのダウンロードやインストールは不要です。

プライベート&安全

データはデバイスの外に出ることはありません。サーバーにアップロードされることはありません。

モバイル対応

完全レスポンシブ対応 — スマートフォン、タブレット、デスクトップで利用できます。

HTML Entity Encoding for Secure Web Content

Key Takeaways

  • HTML entity encoding converts special characters like <, >, and & into safe representations that browsers render as text, not code.
  • Proper entity encoding is a primary defense against Cross-Site Scripting (XSS) attacks in web applications.
  • All encoding and decoding is processed in your browser — your content never leaves your device.

HTML entity encoding is a fundamental web security practice that converts characters with special meaning in HTML into their entity equivalents. Without proper encoding, user-supplied content containing characters like < or > could be interpreted as HTML tags, leading to broken layouts or dangerous XSS vulnerabilities. Every web developer should understand when and how to apply entity encoding.

Cross-Site Scripting (XSS) remains in the OWASP Top 10 — proper output encoding prevents the majority of XSS attacks.

Security Importance

Key Concepts

1

Named vs. Numeric Entities

Named entities like &amp; and &lt; are human-readable, while numeric entities like &#38; and &#60; (or hex &#x26;) work for any Unicode character. Named entities cover only a subset of characters.

2

The Five Critical Characters

The characters < > & " ' must always be encoded in HTML content: &lt; &gt; &amp; &quot; &#39;. These five characters form the minimum encoding set for XSS prevention.

3

Context-Specific Encoding

Different HTML contexts (element content, attributes, JavaScript, CSS, URLs) require different encoding strategies. Entity encoding alone is not sufficient for JavaScript or URL contexts.

4

Unicode Special Characters

HTML entities give access to thousands of special characters — from mathematical symbols to currency signs to arrows — without needing special fonts.

Pro Tips

Always encode output, never input — store raw data in your database and encode when rendering to HTML.

Use your framework's built-in escaping (React JSX, Angular templates, Vue {{ }}) rather than manual entity encoding.

Remember to encode inside HTML attributes too — an unencoded quote in an attribute value can break out of the attribute context.

For content that should contain real HTML (like a rich text editor), use a sanitization library like DOMPurify instead of entity encoding.

All HTML entity encoding and decoding is performed entirely in your browser. Your content is never transmitted to any external server, ensuring privacy for sensitive HTML content.

よくある質問