---
schema_version: "1"
id: ee2a507f6c7df9ec10ddacd3470a3396c9bf5ec8eb6b2392ad83e254692dbafd
title: Lightning Locker
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwc/lightning-components-security/guides/locker/locker-intro.md
canonical_url: https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-intro.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ad5ae25ca6e98c7278949d2ef93a8f71703d248954dbb4e18c6ada1fb9f4920a
products:
  - Security for Lightning Components
  - lwc
---
# Lightning Locker

Lightning Locker is a security architecture for Lightning components. It provides component isolation and security that allows code from many sources to execute and interact using safe, standard APIs and event mechanisms.

In Spring ’22, Salesforce introduced [Lightning Web Security (LWS)](https://developer.salesforce.com/docs/platform/lightning-components-security/lws/lws-intro.md), a new architecture designed to make it easier for your components to use secure coding practices. LWS is enabled by default for all orgs created in Winter ’23 and later. As of Summer ’23, LWS for Lightning web components and Aura components is generally available for all orgs.

Lightning Locker remains the default Lightning component security architecture in orgs created before Winter ’23. Unless LWS is enabled instead, Lightning Locker is enabled by default for all Lightning components on API version 39.0 and later, and you can't disable Lightning Locker for these components.

**tip:** If possible, we recommend that you enable LWS instead of remaining on Lightning Locker. First test LWS in a sandbox environment, and then in production. For a comparison of the features that LWS and Lightning Locker support, see [How Lightning Web Security Compares to Lightning Locker](https://developer.salesforce.com/docs/platform/lightning-components-security/get-started/get-started-compare-lws-locker.md).

**See Also**

- [What Does Lightning Locker Affect?](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-where.md)
- [DOM Access Containment](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-dom.md)
- [How Lightning Locker Uses the Proxy Object](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-proxy.md)
- [Secure Wrappers](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-global-access.md)
- [Lightning Locker Tools](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/locker-tools.md)
