No client side JavaScript is 100% secure, but Cloak JS can make it harder for people to use your intellectual property without permission, bots to automate your site, or hackers to take advantage of security holes.

Use of this website if free. You can also subscribe to on-demand cloaking via RapidAPI.

polymorphic nodebug
   closuresafe include nacl

If you encrypt your code, you must define a function `getEncryptionKey` that returns your password as the property `key` in an object, e.g.

  function getEncryptionKey() {
    return {key:password} // password is a variable defined outside the scope of getEncryptionKey
  }
This function must be synchronous; however, getting the 'password' will typically require a server request. There are several ways to ensure it is set before `getEncryptionKey` is called by the Cloak JS generated code. Typically, putting the password retrieval at the start of the head section and including all Cloak JS code at the end of a document will work. Alternatively, loading the password into session a cookie on a page loaded before the one containing the cloaked code will work, although make it easier to find. However, with debug protection and polymorphic mangling turned on, it will not do interlopers much good.

The nacl library must be available on the client for encrypted code. You can include it automatically, or modify your webpage to load it before encrypted scripts.

Code where functions use variables definied in a closure elsewhere can't be encrypted since the encryption of the function body containing the closure obscures the closure. Hence, by default function encryption is not enabled. You can turn it on by declaring your code "closure safe".

Code transformations may result in changes including an increase it size, a degradation of performance, or the exposure of bugs that may not otherwise be exposed. You agree to test any code you transform using this service prior to using the results and accept responsibility for the impact of the changes. If you have a large file that will not transform using CloakedJS, try and minimize it first using another service and then cloak it with polymorphic capability or encryption.

THIS SOFTWARE AND SERVICE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE AND SERVICE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE AND SERVICE.

Copyright 2020, AnyWhichWay, LLC