HTML Entity Encoder

Escape special characters so they display safely as text in HTML.

ABOUT THIS TOOL

What this tool does

Some characters have special meaning in HTML, so writing them literally can break a page or display incorrectly. This tool converts characters like <, > and & into their safe entity forms — and back again.

HOW TO USE

How to use this tool

  1. 1

    Choose the direction

    Encode when you need text to display as text; decode when you are reading markup that was escaped.

  2. 2

    Paste the content

    For encoding, paste the raw text or HTML fragment.

  3. 3

    Copy the result

    The escaped version is safe to place between tags.

USE CASES

When to use it

  • You want to display code or a tag as visible text on a web page.
  • You are inserting user text into HTML and need to escape it safely.
  • You received entity-coded text and want to read it normally.
  • You are debugging content that renders as symbols instead of characters.
UNDERSTAND IT

How to understand this tool

A browser treats < and & as the start of markup, so text containing them has to be escaped or it gets parsed as tags. The common ones are &lt; &gt; &amp; &quot; and &#39;. This is a display fix only: escaping output is not enough to make user input safe on a server.

What it will not do

  • It does not sanitise input or strip scripts.
  • Decoding twice can turn already-safe text back into markup, so check before pasting into a page.
FAQ

Questions people ask

Why encode < and >?

Left and right angle brackets start HTML tags. Encoding them lets you show the symbols as text instead.

Is this enough to make user input safe?

Escaping is important, but full safety also depends on context and other protections. Do not treat this as complete sanitisation.

GOOD TO KNOW

One thing worth knowing

Encoding is not encryption. It changes representation, not confidentiality — never use it to hide sensitive data.