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
Free online HTML minifier. Reduce file size by removing spaces, line breaks, and comments to improve page speed. 100% private, client-side processing.
Secure JSON formatter: format, validate, and fix JSON locally. Beautify/minify, highlight errors, generate TypeScript or Zod, convert to XML—private. Try now.
Free JSONPath tester and evaluator for API JSON. Extract matching nodes in real time, inspect paths, and copy JSON results while parsing stays local in your browser.
Convert JSON objects or arrays to CSV locally in your browser. Flatten fields, preview the result, then copy or download CSV without uploading data.
Convert CSV text or files to JSON arrays locally in your browser. Supports headers, comma/semicolon/tab delimiters, drag-and-drop files, copy, and download with no uploads.
Compare two JSON documents locally in your browser. Sort object keys for a semantic diff, ignore key-order noise, and mark added, removed, and modified fields without uploads.
Minify JSON into one line, remove indentation and line breaks, and compare original size, minified size, saved bytes, and saved percentage.
Free online JSON to TypeScript converter. Instantly generate TypeScript interfaces and types from your JSON payloads. 100% private, client-side code generation.
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.