A bold tag shown as text
- Text or HTML to encode
- <b>Tom & Jerry</b>
- Characters to escape
- Markup only
Result Encoded HTML: <b>Tom & Jerry</b>
Characters escaped: 5
Input length (characters): 18
Output length (characters): 34
- Replaced & < > " ' with & < > " ' (5 characters escaped in total).
- Non-ASCII characters were left as they are; this is safe when the page is served as UTF-8.
Both tags and the ampersand are escaped, so a browser prints the markup instead of making the words bold.