
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
html-obfuscator
Advanced tools
Extremely simple HTML obfuscator.
Inspired by snapbuilder.com.
[!WARNING] Unless you are working with just plain HTML files, you probably want to use something more advanced instead.
demo.html
<div>
<h1>Hello World!</h1>
</div>
<style>
div {
display: flex;
justify-content: center;
}
</style>
Read demo.html file and obfuscate it.
const { obfuscate } = require('html-obfuscator');
const fs = require('fs');
const source = fs.readFileSync('demo.html');
const out = obfuscate(source);
Result:
<script>document.write(unescape('%3C%64%69%76%3E%0A%20%20%20%20%3C%68%31%3E%48%65%6C%6C%6F%20%57%6F%72%6C%64%21%3C%2F%68%31%3E%0A%3C%2F%64%69%76%3E%0A%3C%73%74%79%6C%65%3E%0A%20%20%20%20%64%69%76%20%7B%0A%20%20%20%20%20%20%20%20%64%69%73%70%6C%61%79%3A%20%66%6C%65%78%3B%0A%20%20%20%20%20%20%20%20%6A%75%73%74%69%66%79%2D%63%6F%6E%74%65%6E%74%3A%20%63%65%6E%74%65%72%3B%0A%20%20%20%20%7D%0A%3C%2F%73%74%79%6C%65%3E'))</script>
html-obfuscator <filepath|text>
If the argument is a path and exists, it will be used, otherwise the arguments themselves will be treated as HTML and obfuscated.
MIT
FAQs
Extremely simple HTML obfuscator.
The npm package html-obfuscator receives a total of 214 weekly downloads. As such, html-obfuscator popularity was classified as not popular.
We found that html-obfuscator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.