Text to HTML numeric entities

Type text to get HTML references that display Arabic letters and symbols correctly in any page or email.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter text, reference type and what to convert.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Each character becomes &# plus its decimal code point plus ;, or &#x plus its hex code point plus ;. Example: < = &#60; = &#x3C;.

Example

Inputs: Reference type = Decimal (&#1587;), What to convert = Every character. Result: HTML references: &#233;; Characters converted: 1.

é
&#233;

Limits and caveats

  • Only numeric references are produced, not names such as &eacute;.
  • In every-character mode spaces and line breaks are converted too.

Questions about this tool

When do I need HTML references for Arabic?

When you cannot be sure the page or email is saved as UTF-8. References show the right letters in any encoding.

Is decimal or hex more correct?

Both are valid and give the same character in every browser: &#1587; and &#x633; are both س.

Why are & and < converted in special mode?

They have meaning in HTML, so writing them as references stops them being read as markup.