HTML Entity Encoder

Encode HTML entities.

How to use

Four quick steps — paste, run, review, copy. Everything stays in your browser.

Paste your input

Paste your input

Drop CSS, HTML, JSON, or other text into the editor. Nothing is uploaded.

Run the tool

Run the tool

Click Convert or Run. The result appears instantly on this page.

Check the output

Check the output

Read the generated code and any review notes before you ship it.

Copy and use

Copy and use

Copy the output to your clipboard and paste it into your project.

About this tool

Encode characters that would break HTML when placed in text nodes or attributes (<, >, &, quotes).

Example

Classic < & " characters that break raw HTML.

Input

Price < $50 & "special" today

Output

Price &lt; $50 &amp; &quot;special&quot; today

Tip

Encode user-facing text; do not double-encode already-safe markup.