JSON presets let you save and reuse the online obfuscator settings that usually matter during review: Standard options, premium preview features, and the Variable Exclusion List.
When to use presets
Use presets when you want repeatable settings across browser sessions, team reviews, support requests, or quick comparisons between Standard mode and premium feature previews.
- Open the online obfuscator.
- Choose Standard, Balanced Preview, Maximum Preview, or a custom feature set.
- Adjust Standard options such as string encoding, string movement, and name replacement.
- Add any Variable Exclusion List patterns that preserve public names.
- Select Export JSON Preset to save the profile.
What the preset stores
The exported preset is a small JSON file designed for the online tool. It stores configuration only; it does not include source code or obfuscated output.
{
"format": "javascript-obfuscator-web-preset",
"version": 1,
"preset": "standard",
"standardOptions": {
"keepLinefeeds": false,
"keepIndentations": false,
"encodeStrings": true,
"moveStrings": true,
"replaceNames": true
},
"advancedFeatures": [],
"variableExclusionList": "^_get_\n^_set_\n^_mtd_"
}
Importing a preset
Use Import JSON Preset in the online obfuscator to load a saved profile. The page validates the preset format and version before applying it.
If imported features do not match a built-in preset, the tool treats the result as a custom profile. That is expected and useful when you want a team-specific setting set.
Using a preset in npm builds
The npm CLI can import the same exported JSON file and map it to the HTTP API payload. This keeps browser review settings aligned with release builds.
npx jso-protector --config jso.config.json --web-preset javascript-obfuscator-preset.json --dry-run --json
In shared config, use "webPreset": "javascript-obfuscator-preset.json". Standard options, selected premium preview features, and the Variable Exclusion List are applied before any explicit options overrides.
How this differs from desktop projects
JSON presets are lightweight browser profiles for the online tool. Desktop projects are still the better workflow for large codebases, embedded JavaScript, local-only handling, and command-line automation.
Online JSON preset Best for quick review, browser testing, and sharing option choices. |
Desktop project Best for project batches, embedded files, local workflows, and generated command-line release steps. |
Tip: if your preset uses premium preview features, keep the online sample below 2KB. Use Standard mode for larger online files, or the desktop workflow for larger protected releases.