Documentation
/

HTML Obfuscation

Obfuscating HTML Files

Pro

With a paid plan, you can obfuscate HTML files containing inline JavaScript. The obfuscator extracts the marked <script> tags, obfuscates their contents, and preserves the surrounding HTML - works with both basic and VM obfuscation.

With parseHtml enabled, only non-empty inline scripts marked with data-javascript-obfuscator are processed. Scripts with src or type="module" are skipped, as are event attributes and javascript: URLs. Marked scripts are processed separately; do not depend on names renamed inside another marked script. Unmarked scripts can use globals that protected scripts explicitly preserve. Source maps and Evaluate output are unavailable for HTML.

Example

HTML

Limitations

Usage is charged for JavaScript selected for obfuscation, subject to the minimum charge per job. Upload limits apply to the whole HTML file.

Compile TypeScript or JSX and bundle your application before the final obfuscation step. Preserve VM selection comments until obfuscation. Do not minify, format, or otherwise rewrite self-defending output afterward. Source maps are unavailable for VM and HTML obfuscation. For functional test settings, see Testing and CI.