My Learning

Keep this for later

Sign in or create a free account to save it. You’ll return to this page afterward.

Sign inCreate an account

HTML Encode

Encode HTML special characters as entities.

How to use this tool

Paste text or markup, then select Process input. Copy the encoded result.

Important to know

Encode HTML special characters as entities.

Encoding helps display markup as text, but it is not a substitute for context-aware escaping when building an application.

Formula and methodology

Converts ampersands, angle brackets and quotation marks to HTML entities using UTF-8.

Frequently asked questions

Will this make my input safe in every context?

No. HTML text, attributes, JavaScript and URLs have different escaping rules.