Loadingβ¦
Loadingβ¦
Escape text for HTML (& < > " ') or decode entities like &, é, and 🤖 back to characters. Supports every named entity in the HTML standard.
Also covers: HTML encoder Β· HTML decoder Β· HTML escape Β· HTML unescape
The result appears here as you type.
Encode escapes text so it displays literally in HTML; Decode turns entities back into the characters they stand for.
Only & < > " ' ` is enough to safely put text inside HTML. You can also encode every non-ASCII character (Γ©, Β©, emoji) for systems that only accept ASCII, as named, decimal, or hex references.
Copy or download it. Swap flips the direction and moves the result into the input.
& and < everywhere, > for safety, and " or ' inside attribute values. Escaping these five (plus the backtick for old Internet Explorer) is what prevents user input from being read as markup and is the basis of preventing cross-site scripting (XSS).
They're equivalent in every browser. Named ones (é) are readable but only exist for some characters, so the tool falls back to numeric ones (é) where there's no name. Decimal and hex encode everything numerically.
For compatibility, browsers decode a few legacy entities even without the semicolon, and this decoder follows the same HTML standard rules. Attribute value rules decode slightly less, exactly as browsers do inside attributes.
Encoding is right for text between tags and in quoted attributes. It is not enough inside <script>, style, or URLs like href="javascript:β¦", which need their own escaping or validation.
No. Everything runs in your browser tab, and nothing you paste or open is uploaded or stored.
Data
Format, validate, and minify JSON in your browser. Paste it, upload a file, or load it from a URL. Errors show the exact line and column.
C# / .NET
Paste JSON and get C# model classes or records, ready for System.Text.Json or Newtonsoft.Json. Nested objects, arrays, nullable types, dates, and GUIDs are inferred for you.
SQL
Format and beautify SQL queries for SQL Server (T-SQL), PostgreSQL, MySQL, Oracle, and more. Set the indentation, keyword case, and layout, and get the exact line of any syntax error.
Data
Format, validate, and minify XML (config files, .csproj, SOAP, RSS) in your browser. Entities, CDATA, and mixed content are kept exactly as written, and errors show the line and column.
Data
Format and validate YAML (docker-compose, Kubernetes, GitHub Actions) without losing comments, or convert YAML to JSON. Errors show the exact line and column.
Web
Beautify HTML pages and fragments without changing how they render. Inline spacing, <pre>, and scripts stay intact, and embedded CSS and JavaScript can be formatted too.