Developer Tools

HTML Entity Encoder / Decoder

Encode and decode HTML entities. Four encoding modes plus a searchable reference table of 100+ common entities.

Encoding Mode

0 characters

Encoded output…

0 characters

CharNamedDecimalHexDescription
&[HTML]Ampersand
<[HTML]Less-than sign
>[HTML]Greater-than sign
"[HTML]Quotation mark
'[HTML]Apostrophe
[HTML]Non-breaking space
­[HTML]Soft hyphen
©[Typography]Copyright sign
®[Typography]Registered sign
[Typography]Trade mark sign
°[Typography]Degree sign
±[Typography]Plus-minus sign
·[Typography]Middle dot
[Typography]Pilcrow / paragraph
§[Typography]Section sign
[Typography]Dagger
[Typography]Double dagger
[Typography]Bullet
[Typography]Horizontal ellipsis
[Typography]Em dash
[Typography]En dash
[Typography]Left single quote
[Typography]Right single quote
[Typography]Left double quote
[Typography]Right double quote
«[Typography]Left angle quotation
»[Typography]Right angle quotation
[Typography]Single left angle quote
[Typography]Single right angle quote
¢[Currency]Cent sign
£[Currency]Pound sign
¥[Currency]Yen sign
[Currency]Euro sign
¤[Currency]Currency sign
×[Math]Multiplication sign
÷[Math]Division sign
½[Math]One half
¼[Math]One quarter
¾[Math]Three quarters
[Math]Infinity
[Math]Summation
[Math]Square root
[Math]Integral
[Math]Almost equal to
[Math]Not equal to
[Math]Less than or equal
[Math]Greater than or equal
[Math]Proportional to
[Math]Partial differential
[Math]Element of
[Math]Not an element of
[Math]Intersection
[Math]Union
[Arrows]Left arrow
[Arrows]Up arrow
[Arrows]Right arrow
[Arrows]Down arrow
[Arrows]Left right arrow
[Arrows]Up down arrow
[Arrows]Left double arrow
[Arrows]Right double arrow
[Arrows]Left right double arrow
α[Greek]Greek small alpha
β[Greek]Greek small beta
γ[Greek]Greek small gamma
δ[Greek]Greek small delta
ε[Greek]Greek small epsilon
ζ[Greek]Greek small zeta
η[Greek]Greek small eta
θ[Greek]Greek small theta
λ[Greek]Greek small lambda
μ[Greek]Greek small mu
π[Greek]Greek small pi
ρ[Greek]Greek small rho
σ[Greek]Greek small sigma
τ[Greek]Greek small tau
φ[Greek]Greek small phi
χ[Greek]Greek small chi
ψ[Greek]Greek small psi
ω[Greek]Greek small omega
Α[Greek]Greek capital alpha
Β[Greek]Greek capital beta
Γ[Greek]Greek capital gamma
Δ[Greek]Greek capital delta
Π[Greek]Greek capital pi
Σ[Greek]Greek capital sigma
Ω[Greek]Greek capital omega
[Symbols]Black spade suit
[Symbols]Black club suit
[Symbols]Black heart suit
[Symbols]Black diamond suit
[Music]Quarter note
[Music]Eighth note
[Music]Beamed eighth notes
[Music]Beamed sixteenth notes
[Music]Music flat sign
[Music]Music natural sign
[Music]Music sharp sign
😀[Emoji]Grinning face
😂[Emoji]Face with tears of joy
❤️[Emoji]Red heart
👍[Emoji]Thumbs up
🎉[Emoji]Party popper
[Emoji]Star
🔥[Emoji]Fire
[Emoji]Check mark button
[Emoji]Cross mark
🚀[Emoji]Rocket

Click any Named / Decimal / Hex cell to copy it to your clipboard.

All encoding and decoding happens entirely in your browser. Nothing is sent to any server.

☕ Love this tool? Support the developer.

100% free — no ads, no limits. Your support keeps every tool free.

$

Secure payment via Stripe · No account needed

About HTML Entity Encoder / Decoder

OptiPix HTML Entity Encoder / Decoder converts text to and from HTML entity notation entirely in your browser. In Encode mode choose from four strategies: Minimal (only escapes the five characters that break HTML: & < > " '), All Named entities (&copy; &mdash; &alpha; …), All Decimal (&#169;), or All Hex (&#xA9;). In Decode mode the tool handles named references (&amp;), decimal numeric references (&#38;), and hex numeric references (&#x26;) — even mixed in the same string. Invalid or unrecognised sequences are left untouched. A searchable reference table of over 100 common entities covers basic HTML characters, copyright and trademark symbols, punctuation and typography, currency signs, math symbols, arrows, Greek letters, card suits, music symbols, and common emoji. Click any Named, Decimal, or Hex cell in the table to copy it to your clipboard instantly. Everything runs in your browser — no data is ever transmitted to a server.

How It Works

Encoding iterates over every character in the input and replaces it with the appropriate entity reference based on the selected mode. Decoding uses three regular-expression passes: one for named references (matched against a lookup table of 250+ named entities), one for decimal numeric references (converted with String.fromCodePoint), and one for hexadecimal numeric references. All processing runs synchronously in the browser.

Use Cases

  • Escape user-supplied text before inserting it into HTML to prevent XSS
  • Convert pasted rich text to safe HTML for a CMS or email template
  • Look up the correct entity for a copyright, trademark, or arrow symbol
  • Decode HTML-encoded API responses to readable text
  • Find the decimal or hex code point for any special character

Frequently Asked Questions

What is an HTML entity?
An HTML entity is a piece of text that starts with & and ends with ; used to represent reserved characters or characters that are difficult to type. For example &amp; represents an ampersand (&) and &copy; represents the copyright symbol (©).
What encoding modes are available?
Four modes: Minimal escapes only the five characters that would break HTML markup (& < > " '); All Named uses named entity references where available; All Decimal encodes every non-safe character as &#nnn;; All Hex encodes every non-safe character as &#xHH;.
Can it decode named, decimal, and hex entities mixed together?
Yes. The decoder handles all three types — named (&amp;), decimal (&#38;), and hex (&#x26;) — in any combination within the same string. Unrecognised sequences are left as-is.
How do I use the reference table?
Expand the reference table and type into the search box to filter by character, entity name, description, or category (e.g. 'arrow', 'greek', 'currency'). Click any Named, Decimal, or Hex cell to copy it directly to your clipboard.
Is my data sent to any server?
No. All encoding, decoding, and entity lookups happen entirely in your browser using JavaScript string processing. Nothing leaves your device.

Related Tools

All 102 Tools

Image CompressorBackground RemoverVideo CompressorImage UpscalerOCR Text ExtractorFormat ConverterImage ResizerEXIF RemoverFace BlurDepth EstimationQR Code GeneratorWatermark MakerColor Palette ExtractorPhoto FiltersImage to PDFObject DetectionImage ClassifierImage CaptionerAI Image GeneratorMeme GeneratorGIF MakerPhoto Collage MakerImage CropPhoto EffectsImage to SVGColor ChangerNoise RemoverPhoto RestorationColor PickerFavicon GeneratorImage to Base64Image Metadata ViewerImage AnnotatorPassport Photo MakerDocument ScannerASCII Art GeneratorImage ComparisonSprite Sheet GeneratorObject RemoverPanorama MakerWord CounterCase ConverterLorem Ipsum GeneratorUUID GeneratorUnix Timestamp ConverterText DiffURL Encoder / DecoderHTML Entity Encoder / DecoderBase64 Text Encoder / DecoderText to Binary / Hex / OctalHash GeneratorJSON Formatter / ValidatorRandom String GeneratorCSV ↔ JSON ConverterMarkdown EditorUnit ConverterPercentage CalculatorBMI CalculatorAge CalculatorTip CalculatorCSS Gradient GeneratorCSS Box Shadow GeneratorCSS Border Radius GeneratorGlassmorphism GeneratorNeumorphism GeneratorCSS Text Shadow GeneratorFlexbox PlaygroundCSS Grid GeneratorAudio TrimmerAudio ConverterAudio MergerAudio RecorderVideo to Audio ExtractorAudio Speed ChangerAudio Volume BoosterRingtone MakerVocal RemoverText to SpeechSpeech to TextAudio Noise RemoverAudio EqualizerAudio EffectsVideo TrimmerVideo MergerVideo ResizerVideo Speed ChangerVideo RotatorVideo to MP4 ConverterAdd Music to VideoMute VideoVideo LooperReverse VideoVideo ScreenshotAdd Subtitles to VideoVideo WatermarkScreen RecorderWebcam RecorderSlideshow MakerVideo FiltersCron Expression BuilderRegex TesterUnix Timestamp Converter