HTML Entity Encoder
Type or paste text above to encode it.
This tool converts special characters into HTML entities and back again. Encoding turns characters like the ampersand, less than, and quote marks into safe entities so they display as text instead of breaking your markup. Decoding reverses the process. Everything runs in your browser, so your text never leaves your device.
How to use
- Pick a direction: encode (text to entities) or decode (entities to text).
- Type or paste your content into the input box on the left.
- Read the converted result in the output box on the right.
- Press Copy to put the result on your clipboard, or Reset to start over.
Examples
- Encode: <a href="x">Tom & Jerry's</a> becomes <a href="x">Tom & Jerry's</a>
- Decode: price €5 & up becomes price €5 & up (the unknown euro entity is left untouched)
- Encode: 5 < 10 && 10 > 5 becomes 5 < 10 && 10 > 5
FAQs
- Which characters get encoded?
- The five characters that matter in HTML markup: ampersand (&), less than (<), greater than (>), double quote ("), and single quote ('). Ordinary letters, numbers, and accented characters are left as is.
- Does decoding handle numeric entities?
- Yes. It decodes named entities like &, plus decimal entities like < and hexadecimal entities like <. Any entity it does not recognize is left exactly as written so nothing is lost.
- Why encode HTML entities at all?
- Encoding lets you show characters such as < and & as literal text instead of letting the browser treat them as markup. It is also a basic step toward preventing broken pages and injected content.
- Is my text uploaded anywhere?
- No. The conversion happens entirely in your browser with client-side code. Nothing is sent to a server.
- What happens to an unknown entity when I decode?
- It stays unchanged. For example ¬real; passes through as written, so you never accidentally lose content the tool does not understand.
Related tools
- URL EncoderPercent encode and decode text for URLs in your browser. Toggle direction, copy results, and see clear errors on malformed input.
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.
- Case ConverterConvert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly in your browser.
- Slug GeneratorTurn any title or text into a clean, lowercase URL slug. Spaces become hyphens, punctuation is stripped, and repeats are collapsed.
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- UUID GeneratorGenerate random version 4 UUIDs in your browser. Pick how many (1 to 100) and copy them in one click. Fast, private, no signup.