Documentation

JavaScript Obfuscator docs

Reference guides for command-line usage, protection options, cross-file workflows, and the desktop app.

Inside The Docs

Practical guides, not placeholder pages.

How-to guides Start with command-line usage, then move into feature-specific references.
Advanced protection Browse cross-file obfuscation topics like Replace Globals and Protect Members.

Encode Strings

  • EncodeStrings
  • Free

Encode Strings rewrites string literals into escaped character sequences so the original text is less readable in the output file.

Example

A readable string such as "tabIndex" can be rewritten as "\x74\x61\x62\x49\x6E\x64\x65\x78".

if (d === "\x74\x61\x62\x49\x6E\x64\x65\x78") {
    var b = c.getAttributeNode("\x74\x61\x62\x49\x6E\x64\x65\x78");
}

When to use it

This is a lightweight way to make important string literals less obvious in the output. It is often combined with other options such as Name Mangling or Move Strings Into Array.

Important: if SelfCompression is enabled, this option does not have the same practical effect because the final script is already packed into a compressed wrapper.