Getting Started
Obfuscator.io transforms your readable source code into a protected version that's difficult to understand and reverse-engineer. It's perfect for protecting proprietary algorithms, licensing logic, and business-critical code.
Welcome to Obfuscator.io
This guide walks you through obfuscating your first file, choosing a preset, and understanding the options panel. For deeper dives, see the VM Obfuscation, Basic Obfuscation, and Best Practices sections.
Quick Start
1. Paste your code
Enter your JavaScript code in the left editor panel. You can paste code directly or use the file upload feature for batch processing.
2. Choose a preset
Select a preset from the dropdown in the Options panel. Start with
Low Obfuscationfor minimal changes orMedium Obfuscationfor balanced protection. VM presets provide the strongest security.3. Click "Obfuscate"
Hit the Obfuscate button to transform your code. The protected output appears in the right panel.
4. Copy or download
Use the Copy button or Download to get your obfuscated code. The output is ready to use in production.
Code Compatibility
Obfuscation (both VM and non-VM) transforms your code in ways that affect certain JavaScript runtime behaviors. Your code must not rely on these features:
function.toString()/class.toString()Obfuscation completely changes the source code representation. Code that parses or compares function source will break.
function.name/class.nameFunction and class names are renamed to random identifiers. Code that relies on
.namefor logging, serialization, or reflection will get obfuscated names.
// Before obfuscation
function calculatePrice() { return 100; }
console.log(calculatePrice.name); // "calculatePrice"
console.log(calculatePrice.toString()); // "function calculatePrice() { return 100; }"
// After obfuscation
console.log(calculatePrice.name); // "_0x1a2b3c" (random)
console.log(calculatePrice.toString()); // Completely transformed codeBasic Options
Before obfuscating, configure these basic options to match your target environment.
Target
targetSpecifies the execution environment for the obfuscated code:
browser(default) — standard web page environment. Output code is identical tonode, but some browser-specific options are not allowed to use with thenodetarget.browser-no-eval— same asbrowser, but the output does not useeval(). Use when the target page has a Content Security Policy that forbidseval/unsafe-eval.node— Node.js environment. Browser-specific options are disabled (they requirewindow/documentand would be no-ops or throw in Node). SomevmSelfDefendingdefenses that rely on browser-only APIs — headless-browser detection, iframe-based clean-realm recovery, anti-inspector/DOM checks — are not emitted for this target.service-worker— Service Worker context. Nowindow, nodocument, differentselfglobal.userscript— userscript manager sandbox (e.g. Tampermonkey).vmSelfDefendingdefences are adjusted accordingly. Requires obfuscator v6.9.0+.
Strict Mode
strictModeControls how the obfuscator handles JavaScript strict mode:
Auto(default) — Auto-detect strict mode from the code. The obfuscator analyzes your code for"use strict"directivesEnable— Force strict mode treatment for all code, regardless of whether"use strict"is presentDisable— Only explicit"use strict"directives in the source code are treated as strict mode
Understanding Presets
Presets are pre-configured option combinations. There are two separate groups:
VM Presets
(bytecode virtualization)
Non-VM Presets
(standard obfuscation)
Interface Overview
Input Editor
— Paste or type your JavaScript source code. Drag & drop files or use the upload button. HTML files with inline scripts are also supportedPro.Output Panel
— Displays the obfuscated result. Use Copy or Download buttons to get the protected code.Preset Selector
— Choose VM or Non-VM presets. VM presets are grouped at the top. The preset determines base options that you can customize.Options Panel
— Fine-tune obfuscation settings. Click the?icon next to any option to see its documentation.Obfuscate Button
— Transforms your code using selected options. VM presets are processed server-side; non-VM presets run in your browser.Multi-file Upload
Pro— Process multiple files at once and download as ZIP.History Panel
Pro— Access your previous obfuscations and restore input/output.
