Skip to main content
Option: transforms.mangleProperties

What it changes

Renames statically known public properties using one consistent program-wide mapping.
Another file, a JSON payload, a template, the DOM, or reflection can still use a renamed property. The transform cannot see those uses. Restrict mangling to names whose reads and writes you control, using regex, reserved, annotations, or a reviewed cache.

Before and after

Configuration

Run this transform by setting transforms.mangleProperties to true or an options object:
obfuscate.mjs
Pass property-mangling options instead of true when you need to limit which properties it changes.

View the implementation

Open the TypeScript implementation on GitHub.

Read the behavior tests

Review behavior checks and cases this transform leaves alone.
Last modified on August 26, 2026