Encrypt JavaScript
Encrypt JavaScript code online, and what that can really mean
People search for a way to encrypt JavaScript so nobody can read it. The browser has to run your code, so whatever unlocks it must ship with it. What you can do is make the code and its strings slow and tedious to read. Below, the three levels of string protection applied to the same function, with the real output of each.
The Short Answer
Obfuscation, not secrecy
“JavaScript encryption” tools rename, encode, encrypt strings and pack code. All of it unpacks in the browser. That raises the cost of copying and tampering; it does not hide a password or an API key.
FreeEncode and move strings, rename
EnterpriseEncrypt Strings
Try firstEvery option previews free online