HTML entity encoder
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Output appears here
Paste or open your data in the input box. It never leaves your browser.
HTML Entity Encoder
Turn characters like < > & " into HTML entities so they show as text in a web page, or decode entities back.
Example: showing a snippet of HTML as text
To show HTML code on a web page, in a CMS or in an email template, its angle brackets, ampersands and quotes must become entities, or the browser runs it as markup:
Input
<p class="note">Price < ₹500 & "free" shipping</p>Output
<p class="note">Price < ₹500 & "free" shipping</p>
How do I use the HTML entity encoder?
- Paste text.
- Choose Encode or Decode.
- Copy the result.
What does the HTML entity encoder do?
- Both directions
- Named and numeric entities decoded
- Safe for pasting into HTML
When to use the HTML entity encoder
A web page reads < as the start of a tag and & as the start of an entity, so text that holds them has to be escaped before it goes into HTML: code samples in a blog post or docs page, user names shown in a template, or snippets pasted into a CMS or an email. Encoding turns < > & " and ' into < > & " and '; everything else, such as ₹ or é, stays as it is, since UTF-8 pages show it fine.
Decoding goes the other way, for text copied out of HTML source, an RSS feed or an API that returned escaped strings. Named entities (&, ©, ) and numeric ones (₹ and —) are all turned back into characters, and anything that isn't a real entity is left alone rather than guessed at.
Frequently asked questions
- Which characters does encoding change?
- The five that mean something in HTML: < > & " and '. That's enough to make text safe inside elements and quoted attributes; other characters are left readable.
- Why does my text show &amp;?
- It was encoded twice: & was encoded again. Decode it once to get &, and once more to get &. Encode text only at the point where it goes into HTML.
- Is this the same as URL encoding?
- No. HTML entities are for text inside a web page; URL encoding (%20, %26) is for text inside a link. Use URL encode for query parameters.
- Is my data uploaded?
- No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.
More JSON tools
Bracely has 108 JSON tools in one page. Related ones:
- GZIP decompress
- JSON Stringify
- Slug generator
- QR code generator
- Webhook signature
- JSON to Base64
- Protobuf decoder
- JWT Decoder
- JSON Escape
- Base64 to JSON
- Certificate decoder
- Unescape JSON
- URL encode / decode
- Mask JSON data
- JSON PII scanner
- Mock API server
- Fake REST API
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- JSON to YAML
- JSON to CSV
- jq Playground
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.7 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram