Netlify Blobs
Guide for using Netlify Blobs object storage. Use when storing files, images, documents, or simple key-value data without a full database. Covers
What Is This?
Overview
Netlify Blobs is a zero-configuration object storage service built directly into the Netlify platform. It allows developers to store and retrieve files, images, documents, binary data, and simple key-value pairs without provisioning a separate database or third-party storage service. The storage layer is accessible from any Netlify compute environment, including serverless functions, edge functions, and framework server routes.
The service operates through a straightforward API centered on the getStore() method, which returns a store instance for performing create, read, update, and delete operations. Developers can choose between deploy-scoped stores, which are isolated to a specific deployment, and site-scoped stores, which persist data across all deployments of a site. This flexibility makes Netlify Blobs suitable for both ephemeral and long-lived data storage needs.
Because no external configuration or infrastructure setup is required, Netlify Blobs reduces the operational overhead typically associated with object storage. It integrates naturally into existing Netlify workflows and supports local development through the Netlify CLI, allowing teams to test storage logic before deploying to production.
Who Should Use This
- Frontend developers building Netlify-hosted sites who need lightweight file or data storage without managing a backend database
- Full-stack developers using Netlify Functions or Edge Functions who require persistent storage accessible at the compute layer
- Teams working with user-generated content such as uploaded images or documents that need a simple storage solution
- Developers building content management features, caching layers, or configuration stores within a Netlify project
- Engineers prototyping applications who want to avoid early infrastructure decisions while still persisting data
- Developers migrating from third-party object storage services who want to consolidate tooling within the Netlify ecosystem
Why Use It?
Problems It Solves
- Eliminates the need to configure and manage external storage services like AWS S3 or Google Cloud Storage for simple use cases
- Removes the complexity of database provisioning when the data model is flat or file-based rather than relational
- Solves the challenge of sharing state between serverless function invocations, which are otherwise stateless
- Addresses the need for deploy-specific data isolation, allowing staged or preview deployments to maintain separate storage contexts
- Simplifies local development by providing a consistent storage interface that works both locally and in production through the Netlify CLI
Core Highlights
- Zero configuration required, storage is available immediately within any Netlify project
- Accessible from serverless functions, edge functions, and server-rendered framework routes
- Supports both site-scoped and deploy-scoped storage contexts
- Full CRUD operations through a clean, promise-based JavaScript API
- Metadata support for attaching structured information to stored blobs
- Listing capabilities for enumerating stored keys within a store
- Local development support via the Netlify CLI development server
- Works with binary data, plain text, JSON, and arbitrary file types
How to Use It?
Basic Usage
Install the package and initialize a store within your function or server route.
npm install @netlify/blobsimport { getStore } from "@netlify/blobs";
const store = getStore("user-uploads");
// Write a value
await store.set("profile-image", imageBuffer);
// Read a value
const image = await store.get("profile-image", { type: "arrayBuffer" });
// Delete a value
await store.delete("profile-image");Specific Scenarios
Storing JSON configuration data:
const config = getStore("site-config");
await config.setJSON("settings", { theme: "dark", language: "en" });
const settings = await config.get("settings", { type: "json" });Listing all keys in a store:
const { blobs } = await store.list();
blobs.forEach((blob) => console.log(blob.key));Real-World Examples
A Netlify Function handling image uploads can write the binary content directly to a blob store and return a retrieval key to the client. A server route in a Next.js or Astro project deployed on Netlify can use a site-scoped store to cache API responses and reduce downstream request volume. A preview deployment can use a deploy-scoped store to maintain isolated form submission data without affecting the production store.
When to Use It?
Use Cases
- Storing user-uploaded files such as avatars, documents, or media assets
- Caching external API responses to reduce latency and rate limit exposure
- Persisting form submissions or lightweight application state across function invocations
- Managing feature flags or site configuration as structured JSON blobs
- Storing generated assets such as PDFs or processed images
- Maintaining session or temporary data scoped to a specific deployment
- Building simple content stores for small-scale CMS functionality
Important Notes
Requirements
- The project must be deployed on or connected to the Netlify platform
- The
@netlify/blobsnpm package must be installed as a dependency - Local development requires the Netlify CLI and an active
netlify devsession - Site-scoped store operations require appropriate Netlify authentication context
More Skills You Might Like
Explore similar skills to enhance your workflow
Swiftui Ui Patterns
Automate and integrate reusable SwiftUI UI patterns for efficient iOS app development workflows
Netlify Image Cdn
Guide for using Netlify Image CDN for image optimization and transformation. Use when serving optimized images, creating responsive image markup,
Idea Refine
Refines ideas iteratively. Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger
Wpds
Use when building UIs leveraging the WordPress Design System (WPDS) and its components, tokens, patterns, etc
Python Code Style & Documentation
- Setting up linting and formatting for a new project
Voltagent Docs Bundle
Look up VoltAgent documentation embedded in node_modules/@voltagent/core/docs for version-matched docs. Use for API signatures, guides, and examples