HomeHTML Encode/Decode

HTML Encode/Decode

Convert special characters to HTML entities to prevent XSS attacks, supports named, decimal and hexadecimal entities



Documentation

About HTML Encoder

This tool encodes text into HTML entities (named/decimal/hex) and supports reverse decoding.

Key Features

  • Three Encoding Modes: Named, decimal, and hexadecimal entities.
  • Encoding Options: Encode all characters and newline encoding options.
  • Two-way Conversion: Encode and decode workflows.
  • Swap Input/Output: Fast round-trip testing.
  • Copy + Clear: Quick utility actions.

Steps

  1. Select an encoding mode.
  2. Configure encoding options.
  3. Enter text and run encode/decode.
  4. Copy result for usage.

Use Cases

  • Preventing text from being parsed as HTML tags.
  • Safely displaying code snippets in pages/editors.
  • Debugging entity/text conversion issues.

FAQ

Named vs numeric entities?

Named entities are more readable; numeric entities are useful for strict compatibility/control.

Why does decoded output look wrong?

Input may mix incompatible entity forms; normalize format before decoding.