How to Use
- Paste text containing special characters.
- Choose Encode or Decode mode.
- Pick “unsafe-only” or “all characters” conversion.
- Copy the output into templates, CMS, or code.
Core Features
- Prevent XSS Attacks: Encode unsafe characters so browsers render text instead of executing markup.
- Safe/All Characters Mode: Encode only risky characters or encode all non-ASCII characters.
- Decode HTML Entities: Convert
<,&, and more back to readable text. - Live Conversion: Convert as you type and copy results instantly.
- Stay private: Process everything locally in your browser.
Related Tools
The 2026 FIRE Calculator (Inflation Adjusted). Simulate real purchasing power, analyze retirement savings gaps, and generate a visual wealth roadmap. One-click CSV export for your Excel or Notion finance dashboard. 100% Private, client-side calculation.
Calculate trade position size from account balance, risk %, entry, and stop loss. Runs locally in your browser with no uploads, so you can compare risk scenarios before you trade.
Calculate compound interest from principal, recurring contributions, APY, and time. Visualize principal, interest, and final balance with a local interactive chart.
Use this Loan Calculator / Mortgage Calculator to estimate monthly payment, total interest, and an amortization schedule locally. Enter amount, rate, and term to calculate now with instant charts.
Use this Investment Calculator / ROI Calculator to estimate starting capital, monthly contributions, annual return, and inflation-adjusted results locally. Calculate projected returns with an instant compound interest chart, ROI, and yearly schedule.
Use this APR to APY Calculator to convert between APR and APY locally. Enter a rate, choose compounding frequency, and see the effective interest rate, spread, and frequency comparison instantly.
Use this Profit Margin Calculator to calculate gross profit, Markup, Margin, and selling price locally. Enter cost and price, or cost and target margin, then calculate your margins instantly.
Use this CPM Calculator and CPC Calculator to estimate ad spend, impressions, clicks, CPM, CPC, and CTR locally. Enter budget and target costs to plan campaign scenarios instantly.
Calculation Logic
- Encode: Map
<,>,&,", and'to their HTML entities (e.g.,<). - Decode: Reverse the mapping using built-in parsing or lookup tables.
- Goal: Ensure content displays as text, not executable HTML/JS.
FAQ
Why do I need to encode HTML characters?
Browsers treat < as the start of a tag. Encoding it as < forces safe text rendering and reduces XSS risk.
What characters are unsafe in HTML?
The big 5 are: <, >, &, double quotes, and single quotes—especially in user-generated content.
Is my data safe (local/privacy)?
Yes. Conversion runs locally with no uploads or server storage.
Is it free? Any limits?
It’s free and requires no sign-up. Paste and copy anytime.
Does entity encoding fully prevent XSS?
It’s a strong layer, but not a complete solution. Proper context-aware escaping and CSP are still required for full protection.