Task path / input to outcome
How to encode and decode HTML entities
- 01
Choose Encode or Decode
Pick a direction in the mode tabs. Encode turns markup into displayable text you can paste into documentation; Decode resolves character references back to real characters you can read. The two pane labels always show which direction is active.
- 02
Paste the content
Use the HTML or plain text field when encoding, or the HTML entities field when decoding. The result updates live as you type, and Load sample shows a small round-trip example with a tag and an emoji reference.
- 03
Read the result
Encoding escapes exactly the five characters that break markup — &, <, >, ", and ' become &, <, >, ", and ' — while decoding resolves named and numeric character references through the browser's own parser. Everything else in your text passes through untouched, so a fragment like <strong> comes back as a real tag when you decode.
- 04
Round-trip with Swap
Swap moves the output back into the input with the opposite mode selected, so you can encode a fragment, swap, and decode it again to confirm the text survives the round trip unchanged. The pane labels switch with the mode, so the current direction is always visible.
- 05
Copy or download
Copy result sends the output to the clipboard, and Download .txt saves it as toolars-html-entities.txt for handing to a colleague or attaching to a ticket. Clear empties both panes for the next fragment.