Storage and cost · 6 min read

Salesforce Storage Costs: What You're Paying and How to Reduce It

Published · Updated · By Edward Elliott

Salesforce storage costs creep up. The included allocation feels generous when you onboard, then a few years later your CRM is paying for hundreds of gigabytes of email attachments, old case files, and historical Opportunity quotes that nobody opens. This guide explains how Salesforce charges for storage, how to find the bloat in your org, and the four strategies for shrinking it — with honest trade-offs.

How Salesforce storage is priced

Each Salesforce edition includes a baseline storage allocation. According to Salesforce's Data and File Storage Allocations, an Enterprise Edition org gets 10 GB of data storage plus 20 MB per user license, and 10 GB of file storage per org. Once you exceed those, additional storage is bought in blocks. Salesforce doesn't publish the price; the figure commonly quoted is around $125 per month for each extra 500 MB of data storage, with file storage priced separately. To see what your own overage costs, and what archiving would save, try our storage cost calculator.

The numbers are deceptive in two ways. First, production orgs keep working past the limit, so many teams don't realize they're over until the renewal quote arrives. Second, the marginal price per GB makes external storage (like S3) look incredibly cheap by comparison: standard S3 storage is about $0.023 per GB per month — roughly two orders of magnitude cheaper than Salesforce file storage, and that's before considering S3's lower-cost tiers like Standard-IA or Glacier.

Data storage vs file storage

Salesforce tracks two storage buckets separately:

  • Data storage — accounts for records: Accounts, Contacts, Opportunities, custom objects, etc. Each record costs about 2 KB regardless of actual field content (exceptions include person accounts, campaigns, Knowledge articles and email messages). The number of records, not their size, is what matters.
  • File storage — accounts for binary content: ContentDocuments, ContentVersions, Attachments, email attachments, document records. Sized by actual file bytes.

The two limits are independent. You can max out file storage while having plenty of data storage left, or vice versa. They have different overage costs and require different mitigation strategies. This guide focuses on file storage because it's almost always the bigger cost driver.

To see your current usage, enter Storage Usage in Setup's Quick Find box. The page shows the space available in each bucket, storage in use per record type, the top users by storage, and the largest files.

Identifying bloat in your org

Storage Usage tells you the totals. To know where the bloat is concentrated, you need to look at distributions — and that means SOQL.

Run these as a user with View All Data and the Query All Files permission. Without it, file queries skip files the user can see only through a record, and the totals come out lower than Storage Usage (Salesforce explains this in its file storage article).

Total file size on modern files, counting every version, since old versions use storage too:

SELECT SUM(ContentSize) FROM ContentVersion

Total file size on legacy Attachments and Documents:

SELECT SUM(BodyLength) FROM Attachment
SELECT SUM(BodyLength) FROM Document

The ratio between these tells you whether your storage is concentrated in modern files or legacy ones — which influences how you migrate or archive them. ContentSize covers files under 2 GB; for larger files, use ContentSizeLong (API version 66.0 and later).

Per-object size breakdown (modern files). ContentDocumentLink rejects queries without a filter unless the running user has Query All Files (API 59.0 and later), and a file linked to several records is counted once per link:

SELECT LinkedEntity.Type, SUM(ContentDocument.LatestPublishedVersion.ContentSize)
FROM ContentDocumentLink
GROUP BY LinkedEntity.Type
ORDER BY SUM(ContentDocument.LatestPublishedVersion.ContentSize) DESC

This typically reveals one or two objects (Case is common, EmailMessage is common) responsible for most of the storage.

Per-creation-year breakdown (modern files):

SELECT CALENDAR_YEAR(CreatedDate), SUM(ContentSize)
FROM ContentVersion
GROUP BY CALENDAR_YEAR(CreatedDate)
ORDER BY CALENDAR_YEAR(CreatedDate) DESC

This reveals the time concentration. Most orgs have a long tail of old files that nobody opens — easy archival candidates.

For a more complete inventory without writing all the SOQL, see our attachment counting guide or use the Salesforce Attachment Counter.

The four strategies

1. Delete

Identify files older than a retention threshold and delete them. The most aggressive option and the cheapest in the short term — deleted files stop counting against storage straight away, because the Recycle Bin doesn't count, though Storage Usage takes a while to update.

Pros: Free, fast, no infrastructure.

Cons: Irreversible. Loses institutional knowledge. Compliance risk if files were subject to retention requirements you didn't realize. Users may need a file you deleted six months later. The undo cost is "restore from a backup" — assuming you have one, and assuming the file is in scope.

When it makes sense: Files you can confidently identify as junk — duplicate uploads, test files in production, files attached to records that are themselves about to be deleted.

2. Archive to external storage with traceability

Move files to S3 (or another low-cost store) while keeping a record in Salesforce of where they went. Users can still find archived files; the original Salesforce file is removed (or kept, your choice) to free storage.

Pros: Order-of-magnitude cheaper storage than Salesforce. Reversible — restore by re-uploading from S3. Compliant — full audit trail of what was archived and when. Users can still access archived files via a Lightning component.

Cons: Requires tooling. Initial setup investment. Slight UX change (downloading archived files goes through S3 instead of Salesforce's CDN, marginally slower).

When it makes sense: Files older than 12–18 months that aren't actively viewed but must be retained.

3. Move to a read-only history org

Spin up a separate Salesforce org dedicated to historical records and files. Migrate old data into it. Active org keeps current operations; history org holds the long tail.

Pros: Files remain in Salesforce, so users have a familiar interface for retrieval. Active org gets the storage relief.

Cons: You're paying for two orgs. Cross-org search is poor. Compliance implications of a separate data location. Works for very large enterprises with the budget; rarely makes sense at mid-market.

4. Tier files by access pattern

Hot files (recently accessed, frequently viewed) stay in Salesforce file storage. Warm files move to a cheaper tier still in Salesforce (compress them, deduplicate them). Cold files move to external storage. The most sophisticated option but also the highest engineering cost.

Pros: Best fit to actual usage patterns.

Cons: Complex. Requires visibility into actual file access patterns (Salesforce doesn't track this natively for files). Most teams overengineer this when option 2 would have sufficed.

Choosing a strategy for one group of files at a time. Strategy 4, tiering, is this same flow re-run as files age.

Why S3 archival makes sense for most teams

Option 2 (archive to S3 with traceability) is the right choice for most mid-market and enterprise Salesforce orgs because it gives you most of option 1's cost savings without option 1's risks. S3 storage is so cheap that the math is hard to argue with: a 100 GB file storage problem in Salesforce that costs thousands of dollars per year drops to a few dollars per month in S3 Standard, and to under a dollar in Glacier.

Crucially, the right archival approach keeps users productive. They shouldn't have to know a file is "archived" — they should see it on the record page (via a Lightning component or the standard related list) and download it like any other file. Behind the scenes, the file streams from S3 instead of Salesforce CDN. The UX cost is one or two seconds of additional latency on download. The storage cost saving is 10× to 100×.

Implementation considerations

  • Compliance and retention — review your data retention obligations before archiving. If files must be retained for 7 years, S3 Glacier is fine; if they must remain in Salesforce, archival isn't an option (option 4 might be).
  • Audit trail — a clean archival creates a Salesforce record per archived file showing when it was archived, by whom, and where it lives in S3. Don't archive without that trail. Salesforce File Archiving uses custom ContentDocumentArchive__c and ContentDocumentLinkArchive__c objects for exactly this.
  • Deduplication — files attached to multiple parent records (the same contract attached to three Accounts) should upload to S3 once, not three times. Verify your tool deduplicates.
  • Reversibility — the archival process should be reversible. If you archive a file and decide six months later it should be in Salesforce, you should be able to restore it from S3 without a custom job.
  • Bring-your-own bucket — for some compliance scenarios you need S3 in your own AWS account, not a vendor's. Verify the tool supports this.
  • End-user access — archived files should still appear on record pages without users needing to know they're in S3. A Lightning Web Component is the cleanest way; many tools include one.

Reduce storage cost without losing access

Salesforce File Archiving moves Salesforce files to Amazon S3 with full traceability — custom Salesforce tracking objects so users still find their files, deduplication so you don't pay twice, and dry-run mode so you preview deletions before they happen.

Explore Salesforce File Archiving

Sources

  1. Data and File Storage Allocations · Salesforce Help
  2. Salesforce Data Storage: Estimated Record Size by Object Type · Salesforce Help
  3. Salesforce File Storage Limit – Understanding and Reducing File Storage Usage · Salesforce Help
  4. Data storage amount limit exceeded · Salesforce Help
  5. Manage the Recycle Bin in Lightning Experience · Salesforce Help
  6. Data and Storage Resources · Salesforce Help
  7. ContentDocumentLink · Salesforce Object Reference

Related reading

Request a demo