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.
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.
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.
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.
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.
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 < becomes &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.
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.
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.
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.
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.
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.
Yes. Decimal forms such as < and hex forms such as < both decode, and so do named entities such as &. Unknown names are left as they stand.
No. Encoding and decoding happen in your browser, and nothing is sent to or stored on a ToolPeko server.
Same rules as this one: free, in your browser, with nothing uploaded.
Paste messy JSON, get it neat and valid.
Check JSON and find the exact line that breaks it.
Squeeze JSON down to one tight line.
Open JSON as a tree you can fold and explore.
JSON rows turned into a CSV a spreadsheet can open.
A CSV file turned into clean JSON objects.
JSON rewritten as YAML for config files.
YAML config turned into JSON you can use in code.