Share via

Azure Blob Size

Handian Sudianto 7,026 Reputation points
2026-04-22T12:38:30.3366667+00:00

How we can know size of azure blob container? And also can we limit by creating the quota for azure blob container?

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.

0 comments No comments

Answer accepted by question author

  1. Ravi Varma Mudduluru 11,235 Reputation points Microsoft External Staff Moderator
    2026-04-22T14:54:45.3+00:00

    Hello @ Handian Sudianto

    Thank you for reaching out to Microsoft Q&A
    Azure does not show container‑level size directly in the Azure portal by default. However, you can determine container size using the following supported method:

    1.Azure Storage Explorer (Recommended & Simple)

    • You can use Azure Storage Explorer to calculate container size.
    • Select the container → use Folder Statistics, which computes the total size of blobs in the container.

    Microsoft-supported tool: https://learn.microsoft.com/azure/storage/common/storage-explorer-introduction

    Important note: Azure Monitor exposes storage account–level capacity metrics only, not per‑container usage.

    Documented limitation: https://learn.microsoft.com/azure/storage/blobs/monitor-blob-storage-reference

    1. Can we set a quota or size limit on an Azure Blob container?

    No, Azure does not support setting quotas or size limits at the container level.

    What is supported:

    • Azure enforces limits at Storage account level

    Reference document:
    Calculate the size of a Blob storage container: https://learn.microsoft.com/en-us/azure/storage/scripts/storage-blobs-container-calculate-size-cli

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-22T12:38:45.3833333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To get the size of an Azure Blob Storage container and understand quota options, use the following supported approaches.

    1. Calculate container size

    There is no built-in per-container size metric, but container size can be calculated by summing the sizes of all blobs in that container.

    Two documented options:

    a. Using Azure Storage inventory + Azure Synapse (recommended for many containers / large accounts)

    1. Enable Azure Storage blob inventory on the storage account and ensure the Content-Length field is included in the inventory schema.
    2. Once an inventory CSV report is generated, use Azure Synapse serverless SQL to aggregate size per container.
    3. Run a query like this against the inventory CSV:
    SELECT LEFT([Name], CHARINDEX('/', [Name]) - 1) AS Container,
           COUNT(*) As TotalBlobCount,
           SUM([Content-Length]) As TotalBlobSize
    FROM OPENROWSET(
        bulk '<URL to your inventory CSV file>',
        format='csv', parser_version='2.0', header_row=true
    ) AS Source
    GROUP BY LEFT([Name], CHARINDEX('/', [Name]) - 1)
    

    TotalBlobSize gives the total size of all blobs in each container.

    b. Using Azure CLI to total blob sizes in a single container

    There is a script pattern that:

    • Uses az storage blob list to list all blobs in a container.
    • Sums their sizes to produce an estimated container size.

    Notes from the script:

    • It “calculates the size of a container in Azure Blob storage by totaling the size of the blobs in the container.”
    • It is an estimate and “should not be used for billing calculations.”
    • A single listing call returns up to 5000 blobs; continuation tokens are required for more.
    1. Quotas / limits for a blob container

    Per-container hard quotas cannot be configured. Relevant limits:

    • “Maximum size of single blob container | Same as maximum storage account capacity.”
    • Other limits (max blob size, max blocks, etc.) apply per blob, not as a configurable quota per container.

    So:

    • A container can grow up to the storage account’s capacity target; there is no native feature to set a smaller, enforceable quota on an individual container.
    • To “limit” usage per container, use monitoring and alerting:
      • Use Storage inventory plus aggregation (as above) to monitor capacity per container.
      • Use Azure Monitor / Log Analytics queries to track usage and operations per container and trigger alerts when thresholds are exceeded.

    Example monitoring pattern:

    • Use blob inventory to “take an inventory of blobs with size information” and “aggregate the size and count at the container level.”
    • This is explicitly recommended for scenarios where data is partitioned by container and capacity per container (for example, per customer) must be monitored.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.