100% FREE  -  NO SIGN-UP  -  YOUR FILES NEVER LEAVE YOUR DEVICE

HTML Encoder Decoder

Turn the characters HTML treats as markup into entities, and turn entities back into plain text, with a count of what changed. It runs in your browser, no upload.

100% free, no premium plan No sign-up Files never leave your device
Drop your text here
or click to choose a file from your device

Your files are processed in your browser, on your own device. Nothing is uploaded to a server.

    The HTML Encoder Decoder turns the characters HTML treats as markup into entity references, and turns entities back into plain text. Encode covers &, <, >, double quotes and single quotes, with an option to write non-ASCII characters as decimal entities. Decode reverses named and numeric entities. It is free, runs in your browser, and uploads nothing.

    How the HTML Encoder Decoder works

    Encode reads your text and swaps the five characters that HTML treats as markup, the ampersand first, then the two angle brackets and both quote marks. A browser then shows those characters as text instead of reading them as a tag or closing an attribute early. Switch on the extra option and characters outside plain ASCII are written as decimal entities as well.

    1. Paste the text or markup into the box.
    2. Choose encode or decode.
    3. For encode, decide whether non-ASCII characters should become decimal entities too.
    4. Copy the result, and check the entity count under it.

    The count under the result tells you how many entities the conversion involved, which is a quick sanity check on a long paste. If you encoded a page of code samples and the count looks tiny, the paste probably was not what you thought it was. If a decode reports a large count, the source you copied was carrying more markup baggage than it showed.

    When the HTML Encoder Decoder helps most

    Showing code on a page is the classic job. A tutorial, a help article or a documentation page needs a tag sample to appear as text, exactly as typed. Left unencoded, the browser swallows the sample as real markup and the reader sees a gap where the example should be.

    Attribute values are the second job. A title, a name or a caption holding quote marks will break out of a quoted attribute and bend the rest of the tag with it. Encoding the quotes keeps the value inside its attribute, where it belongs.

    Cleaning copied text is the third. Text lifted out of a page source arrives full of entities, hard to read and harder to edit. Decode turns it back into plain words. And when a document or an old system can only carry plain ASCII, the decimal entity option writes every non-ASCII character as a number any system can hold. The browser cannot tell your sample tag from a real tag, so the entities do the telling.

    HTML encoding rules and honest limits

    Encoding protects two places: the HTML body and quoted attribute values. A value placed inside a script block or inside a URL needs different handling, and no amount of entity encoding makes it safe there. A value headed into a web address needs percent encoding instead, and the URL Encoder Decoder covers that job.

    Double encoding is the common mistake. Encode text that already holds entities and each one is encoded a second time, so &lt; becomes &amp;lt; and the page displays the entity itself as letters. The fix is to encode plain text once. Decode follows the same shape and works one layer at a time, so a doubly encoded string needs two decode passes to come back.

    Decode handles the standard named entities and numeric entities in decimal or hex form. A name the decoder does not know is left as it stands rather than turned into a guessed character, so a typo inside an entity survives for you to spot instead of being silently rewritten into something wrong.

    Your text stays in your browser

    The converting runs on your device. Text you paste is not sent to a server, not stored by ToolPeko and not read by anyone here. There is no account and no daily cap. Close the tab and your text goes with it.

    FAQs

    Which characters does encode change on this HTML Encoder Decoder?

    Five: the ampersand, the two angle brackets, the double quote and the single quote. With the extra option on, characters outside plain ASCII are written as decimal entities too.

    What does the entity count under the result mean?

    It is the number of entities the conversion involved, either written during encoding or resolved during decoding. It is a handy check that a long paste converted the way you expected.

    Why does my page show an entity as visible text?

    The text was encoded twice. The second pass encoded the ampersand of an existing entity, so the browser displays the entity itself as letters. Decode it once to get back to the singly encoded form.

    Does encoding make user input safe to place anywhere in a page?

    No. Entities protect the HTML body and quoted attribute values. Script blocks and URLs follow different rules and need their own handling, and this tool does not claim to cover them.

    Can decode read numbers like &#60; as well as names?

    Yes. Decimal forms such as &#60; and hex forms such as &#x3C; both decode, and so do named entities such as &amp;. Unknown names are left as they stand.

    Is my text uploaded or saved anywhere?

    No. Encoding and decoding happen in your browser, and nothing is sent to or stored on a ToolPeko server.

    More Developer Tools

    Same rules as this one: free, in your browser, with nothing uploaded.

    Scroll to Top