Skip to main content

Scratch Orgs

Use short-lived scratch orgs for isolated Salesforce development and testing, created from your Dev Hub.

Scratch orgs are short-lived, disposable Salesforce environments for isolated development and testing. They are created from a Dev Hub and torn down when you are done, so each piece of work can start from a clean org.

Why use scratch orgs

  • Develop and test a change in isolation, away from shared sandboxes.
  • Start from a known configuration each time rather than a drifting environment.
  • Discard the org when the work is finished instead of maintaining it.
New Scratch Org dialog with definition and duration fields

What you need

Scratch orgs are created from a Dev Hub, so a connected Dev Hub is a prerequisite. Managing the Dev Hub is covered in Dev Hub Management, and reusing scratch orgs efficiently is covered in Scratch Org Pooling.