---
title: Migrate from Netlify Blobs to Vercel Blob
description: Migrate from Netlify Blobs to Vercel Blob, including stores, private and public access, metadata, conditional writes, a copy script, and a staged cutover.
keywords: ["Vercel Blob","Netlify Blobs","migrate from Netlify Blobs","blob storage migration","file storage","object storage"]
url: "https://vercel.com/kb/guide/migrate-from-netlify-blobs-to-vercel-blob"
published: 2026-12-03
last_updated: 2026-12-03
authors: Ben Sabic
related_resources:
  - title: "Vercel Blob vs Netlify Blobs"
    url: "/kb/guide/vercel-blob-vs-netlify-blobs"
    description: "Compare Vercel Blob and Netlify Blobs on storage model, public URLs, delivery, limits, and pricing to choose the right object or key/value store for your app."
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest kb search "<query>"
read_with_vercel_cli: "npx vercel@latest kb inspect migrate-from-netlify-blobs-to-vercel-blob"
---

To move files from [Netlify Blobs](https://docs.netlify.com/build/data-and-storage/netlify-blobs/) to [Vercel Blob](https://vercel.com/docs/vercel-blob), create a Blob store, replace your application's `@netlify/blobs` calls with the `@vercel/blob` SDK, and copy existing blobs with a script. Review the [migration limitations](#what-doesn%27t-map-from-netlify-blobs) before starting if your application relies on custom metadata, deploy-specific stores, file-based uploads, or a store used as a key/value database.

Both products store objects under string names, but Netlify Blobs relies on your functions to read and return each file because it has no public URLs. When creating a Vercel Blob store, choose private access to keep function-based delivery or public access to let browsers load files from CDN URLs.

You can use Vercel Blob from an application on any host. Your backend connects through the SDK using a [read-write token](https://vercel.com/docs/vercel-blob/using-blob-sdk), while the files are stored and served on Vercel's infrastructure. Your app can stay on Netlify during and after migration.

## Prerequisites

You need a [Vercel account](https://vercel.com/signup), a Netlify personal access token, and your Netlify project ID from **Project configuration > General > Project information**.

Use Node.js 22.12 or later for the migration scripts and the latest [Vercel CLI](https://vercel.com/docs/cli).

## Migrate with your agent

Use this prompt in your application's repository to have a coding agent find where your code uses Netlify Blobs and prepare the migration:

### Agent prompt

```txt
Use https://vercel.com/kb/guide/migrate-from-netlify-blobs-to-vercel-blob to migrate this application to Vercel Blob.

1. You can also read the migration guide using the Vercel CLI: `npx vercel@latest kb inspect migrate-from-netlify-blobs-to-vercel-blob`.
2. Inventory `@netlify/blobs` imports and call sites, including store names, `getStore()` and `getDeployStore()` options, key formats, value types, `set()`, `setJSON()`, `get()` types, `getWithMetadata()`, `getMetadata()`, `list()`, `delete()`, `deleteAll()`, metadata fields, conditional writes, consistency settings, regions, and files written to `.netlify/blobs/deploy`. Preserve the application's authorization checks.
3. Identify features that need a different design, including custom metadata, deploy-specific stores, file-based uploads, `onlyIfNew` writes, strong consistency on public files, and stores used as a key/value database. Ask for a decision only where that choice blocks implementation, such as private or public access for each store.
4. Keep both providers behind one application module. Map each Netlify store and region to a collision-free pathname prefix, preserve original keys in a separate completed manifest for each copy run, and select the provider with a flag. Keep the Netlify path available until I approve cutover.
5. Port one call site at a time. Check overwrite behavior, missing-blob handling, content types, stream conversion, pagination, and caching against the guide and the SDK reference: https://vercel.com/docs/vercel-blob/using-blob-sdk
6. Keep the source authoritative until the final copy is verified. Plan a write pause or an ordered change log covering creates, replacements, metadata updates, renames, and deletes. Preflight pathname mappings, verify per-file content and permissions, and reconcile the same changes before any rollback. Do not remove source data or revoke credentials without approval.
7. Run local checks first. Describe any live test and the resources it creates before running it. Report the results, remaining configuration, and cutover plan. Do not switch production traffic without my approval.
```

## How Netlify Blobs features map to Vercel Blob

Site-wide stores become prefixes in a Blob store, and keys become pathnames. Replace `set()`, `get()`, `list()`, and `delete()` with `put()`, `get()`, `list()`, and `del()`. Compare [Vercel Blob and Netlify Blobs](https://vercel.com/kb/guide/vercel-blob-vs-netlify-blobs) before migrating, especially if your app relies on [custom metadata or deploy-specific stores](#what-doesn%27t-map-from-netlify-blobs).

Since `@netlify/blobs` supports only TypeScript and JavaScript, the mappings use those languages. Vercel Blob's [Python SDK](https://vercel.com/docs/vercel-blob/python-sdk-reference) supports Python backends.

### Stores, credentials, and limits

Replace each Netlify store with a pathname prefix in a Blob store, and choose the store's access mode and region when you create it.

| Netlify Blobs                                                                                                                    | Vercel Blob                                                                                          | What you change                                                                                                                                                                      |
| -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Netlify project that owns the blobs                                                                                              | [Blob store](https://vercel.com/docs/vercel-blob) connected to one or more Vercel projects           | Create a store and connect it to each project that reads or writes it.                                                                                                               |
| Credentials set automatically in Netlify Functions, Netlify Edge Functions, and build plugins, or `siteID` and `token` elsewhere | OIDC through `BLOB_STORE_ID` and `VERCEL_OIDC_TOKEN` on Vercel, or `BLOB_READ_WRITE_TOKEN` elsewhere | Run `vercel link` and `vercel env pull` for local development.                                                                                                                       |
| Site-wide store opened with `getStore(name)`                                                                                     | Pathname prefix in one Blob store, or one Blob store for each Netlify store                          | Prefix each key with its store name, such as `uploads/photo.jpg`. Use separate Blob stores when data needs different access modes or regions.                                        |
| Deploy-specific store opened with `getDeployStore()`                                                                             | No equivalent                                                                                        | Blob stores are independent of deployments. See the [deploy-specific store options](#deploy-specific-stores-and-file-based-uploads).                                                 |
| Private blobs with no public URL                                                                                                 | `access` of `'private'` or `'public'`, set for the whole store at creation                           | Choose private to keep function-based delivery, or public for CDN URLs.                                                                                                              |
| Five regions, with site-wide stores in `us-east-2` unless you pass `region`                                                      | One of 19 regions, set at store creation, with `iad1` as the default                                 | Choose the region closest to the Functions that read and write the store. The region can't change after creation.                                                                    |
| Key of up to 600 bytes                                                                                                           | Pathname of up to 950 characters                                                                     | The combined name fits the length limit, but keys containing consecutive slashes or control characters need an explicit mapping. Validate the mapping for collisions before copying. |
| Object of up to 5 GB                                                                                                             | File of up to 5 TB                                                                                   | Use multipart uploads above 100 MB.                                                                                                                                                  |

### Reads, writes, and listing

Vercel Blob functions take a pathname where Netlify store methods take a key, and `put()` doesn't overwrite an existing blob by default.

| Netlify Blobs                                                      | Vercel Blob                                                                | What you change                                                                                          |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `store.set(key, value)`, which overwrites an existing key          | `put(pathname, body, { access })`, which fails when the pathname exists    | Pass `allowOverwrite: true` to keep the overwrite behavior.                                              |
| `store.setJSON(key, value)`                                        | `put()` with `JSON.stringify(value)` and `contentType: 'application/json'` | Serialize JSON in your code.                                                                             |
| `store.get(key, { type })`, which returns `null` for a missing key | `get(pathname, { access })`, which returns `null` for a missing blob       | Read the body from `result.stream`.                                                                      |
| `store.getMetadata(key)`, which returns `null` for a missing key   | `head(pathname)`, which throws `BlobNotFoundError` for a missing blob      | Catch the error. `head()` returns system fields such as `size`, `uploadedAt`, `contentType`, and `etag`. |
| `store.getWithMetadata(key)`                                       | `get()`, with system fields in `result.blob`                               | Vercel Blob stores no custom metadata. See the [metadata alternatives](#custom-metadata).                |
| `store.delete(key)`                                                | `del(pathname)`                                                            | Rename the call. Neither throws for a missing blob.                                                      |
| `store.deleteAll()`                                                | `list()` with a prefix, then `del()`                                       | Delete each page of results. `vercel blob empty-store` empties a whole Blob store.                       |
| `store.list({ prefix })`, which fetches every page                 | `list({ prefix, cursor })`, which returns up to 1,000 blobs per call       | Loop until the result has no `cursor`.                                                                   |
| `store.list({ directories: true })`                                | `list({ mode: 'folded' })`                                                 | Read `folders` in place of `directories`.                                                                |
| `listStores()`                                                     | `list({ mode: 'folded' })` without a prefix, or `vercel blob list-stores`  | With one prefix per Netlify store, the top-level folders are your store names.                           |

### Conditional writes, consistency, and expiry

Vercel Blob reports a failed condition by throwing an error, and it controls read freshness through its CDN cache settings.

| Netlify Blobs                                                               | Vercel Blob                                                                              | What you change                                                                                             |
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `onlyIfNew: true`                                                           | `put()` without `allowOverwrite`                                                         | Let failed writes reach the caller. Overwrite protection is not a verified replacement for an atomic claim. |
| `onlyIfMatch` with an ETag                                                  | `ifMatch` on `put()`, `copy()`, `rename()`, or `del()`                                   | Catch `BlobPreconditionFailedError` in place of checking `modified`.                                        |
| `getWithMetadata(key, { etag })`, which returns `data` of `null` on a match | `get(pathname, { access, ifNoneMatch })`, which returns a `statusCode` of 304 on a match | Check `statusCode` before reading the stream.                                                               |
| `consistency: 'strong'`                                                     | `useCache: false` on `get()`, for private stores                                         | Public stores have no cache bypass.                                                                         |
| Updates and deletes that reach every edge location within 60 seconds        | Overwrites and deletes that can take up to 60 seconds to leave the CDN cache             | Write changed content to a new pathname where you can.                                                      |
| Expiry timestamp in `metadata`, checked by your code                        | `ttlDays` on `put()`, or `setTtl()`                                                      | Use it for expiry in whole days. Keep the check in your code for shorter or exact expiry times.             |
| `metadata` object of up to 2 KB                                             | No equivalent                                                                            | Store metadata in a database, a sidecar blob, or the pathname.                                              |

### Delivery, uploads, and tools

Public URLs and client uploads replace functions that proxy files, and the Vercel CLI and dashboard replace Netlify's.

| Netlify Blobs                                                      | Vercel Blob                                                                                                                                             | What you change                                                                                                  |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Function that reads a blob and returns it                          | `get()` in a Function for a private store, the blob's URL for a public store, or a [signed URL](https://vercel.com/docs/vercel-blob/vercel-signed-urls) | Keep the function for private files. Remove it for public files.                                                 |
| Function that receives a file and calls `set()`                    | Server upload with `put()`, or client upload with `upload()` and `handleUpload()`                                                                       | Vercel Functions have a 4.5 MB request body limit. Use client uploads for larger files.                          |
| Files written to `.netlify/blobs/deploy` during the build          | No equivalent                                                                                                                                           | Upload from a build script. See the [file-based upload options](#deploy-specific-stores-and-file-based-uploads). |
| `netlify blobs:list`, `blobs:get`, `blobs:set`, and `blobs:delete` | `vercel blob list`, `get`, `put`, and `delete`                                                                                                          | Pass `--access` to `get` and `put`.                                                                              |
| **Data & Storage > Blobs** in the Netlify UI                       | The store's **Browser** section under the **Storage** tab                                                                                               | Dashboard browsing and uploads count as Advanced Operations.                                                     |

## Steps

### 1\. Find where your application uses Netlify Blobs

Search for Netlify Blobs imports, call sites, and environment variables, then trace aliases through your code to identify features that need a replacement.

```bash
grep -rnE \
  "@netlify/blobs|getStore\(|getDeployStore\(|NETLIFY_BLOBS_CONTEXT" \
  --include="*.ts" --include="*.tsx" --include="*.mts" --include="*.cts" \
  --include="*.js" --include="*.jsx" --include="*.mjs" --include="*.cjs" \
  --include="*.vue" --include="*.svelte" --include="*.astro" \
  --exclude-dir=node_modules --exclude-dir=.netlify .
```

Each match prints a file path, a line number, and the matching line. Also check `package.json` for the `@netlify/blobs` dependency, and your build scripts and build plugins for files written to `.netlify/blobs/deploy`.

Record each store name, whether its blobs are private data or files a browser loads, and the options each call site passes. Match what you find to the steps that follow:

| In your code                                                                                                                                         | Go to                                                                         |
| ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| `getStore()`, `siteID`, `token`, or `region`                                                                                                         | [Step 2](#2.-create-a-blob-store-and-authenticate)                            |
| `set()`, `setJSON()`, `get()`, `getMetadata()`, or `delete()`                                                                                        | [Step 4](#4.-replace-store-reads,-writes,-and-deletes)                        |
| `list()`, `deleteAll()`, or `listStores()`                                                                                                           | [Step 5](#5.-replace-listing-and-bulk-deletes)                                |
| `onlyIfNew`, `onlyIfMatch`, `etag`, or `consistency`                                                                                                 | [Step 6](#6.-replace-conditional-writes-and-consistency-options)              |
| A function that returns a blob in a `Response`, or one that stores an uploaded file                                                                  | [Step 7](#7.-replace-blob-delivery-and-upload-functions)                      |
| `metadata`, `getWithMetadata()`, `getDeployStore()`, `.netlify/blobs/deploy`, `connectLambda()`, or small records read and written as key/value data | [What doesn't map from Netlify Blobs](#what-doesn%27t-map-from-netlify-blobs) |

### 2\. Create a Blob store and authenticate

Map each Netlify store to a Blob store, or use a distinct pathname prefix for each source store. Choose private access for files your application authorizes and public access for files anyone may read.

Link your local directory to the Vercel project that will use the store:

```bash
vercel link
```

Create a private store and connect it to all three project environments with `--yes`. For files anyone may read, change the access option to `--access public`:

```bash
vercel blob create-store uploads --access private --yes
```

Choose the store’s [region](https://vercel.com/docs/regions#region-list) with `--region` if the default `iad1` does not suit the workload. Access mode and region are fixed at creation. To connect selected environments, use `--environment` for each one instead of `--yes`.

Pull the Development environment variables into `.env.local`:

```bash
vercel env pull
```

#### Local development and deployments on Vercel

The SDK uses `BLOB_STORE_ID` with the project’s OIDC token for server-side requests. Vercel manages deployed tokens, and the SDK can refresh local credentials using your CLI sign-in. Load `.env.local` when running a local script, as the commands in the SDK examples show.

If you create the store in the dashboard, its connection initially includes Production and Preview. Add Development under **Projects > Update Project Connection** before pulling local variables.

#### Backends on another host

Set the store’s `BLOB_READ_WRITE_TOKEN` in the backend’s environment. The CLI setup supplies this variable; dashboard connections require **Add a read-write token env var to this connection**. The SDK reads it automatically; keep it server-side.

Browser uploads through `handleUpload()` also require this token. For an OIDC-only connection, use `handleUploadPresigned()` instead.

#### More than one store

Give each additional connection a **Custom Environment Variable Prefix** so its credentials do not replace another store’s variables. For a connection prefixed `PUBLIC_FILES`, pass its store ID on calls that use OIDC:

```javascript
import { put } from '@vercel/blob';

const storeId = process.env.PUBLIC_FILES_STORE_ID;
await put('reports/summary.txt', 'Quarterly summary', {
  access: 'public',
  storeId,
});
```

For another host, pass the corresponding prefixed read-write token instead. Keep the source credentials through verification and the rollback period.

### 3\. Install the Vercel Blob SDK

Install `@vercel/blob` 2.9.0 or later for `ttlDays`, `rename()`, and consistent reads. The package requires Node.js 20 or later:

**pnpm**

```bash
pnpm i @vercel/blob
```

**npm**

```bash
npm i @vercel/blob
```

**yarn**

```bash
yarn add @vercel/blob
```

**bun**

```bash
bun add @vercel/blob
```

Keep the `@netlify/blobs` package until no code path uses it. The copy script in [step 8](#8.-copy-existing-blobs-to-vercel-blob) needs both packages.

### 4\. Replace store reads, writes, and deletes

Replace each store method with the corresponding `@vercel/blob` function. `getStore()` has no counterpart, because the SDK finds the Blob store from your credentials and each function takes a pathname in place of a store and key.

Route every blob operation through one module in your application, and add a flag that selects Netlify Blobs or Vercel Blob. Add the Vercel calls beside the Netlify calls, and keep the Netlify path until step 9.

#### Map store names and keys to pathnames

With one Blob store, join the Netlify store name and the key into a pathname. The key `user-123` in the `user-settings` store becomes `user-settings/user-123`. Slashes separate folders, so `list()` can filter by the store prefix. Use the same mapping in your application and in the step 8 copy script.

Keep original keys in the manifest. If a key needs a different pathname, use a reversible mapping or a lookup table in the shared storage module; don't remove characters from keys. Include the source region in the mapping when the same store name contains separate data in more than one region. Preflight the combined mappings for every source store before copying into the same destination.

#### SDK calls

| Task                      | Netlify Blobs                                              | Vercel Blob                                                 |
| ------------------------- | ---------------------------------------------------------- | ----------------------------------------------------------- |
| Import                    | `getStore` from `@netlify/blobs`                           | `put`, `get`, `head`, `list`, and `del` from `@vercel/blob` |
| Select a store            | `getStore(name)`                                           | Pathname prefix, with `access` on each call                 |
| Write text or binary data | `store.set(key, value)`                                    | `put(pathname, body, options)`                              |
| Write JSON                | `store.setJSON(key, value)`                                | `put()` with `JSON.stringify(value)`                        |
| Read text                 | `store.get(key)`                                           | `get()`, then `new Response(result.stream).text()`          |
| Read JSON                 | `store.get(key, { type: 'json' })`                         | `get()`, then `new Response(result.stream).json()`          |
| Read a stream             | `store.get(key, { type: 'stream' })`                       | `result.stream` from `get()`                                |
| Read bytes                | `store.get()` with `type: 'arrayBuffer'` or `type: 'blob'` | `new Response(result.stream).arrayBuffer()` or `.blob()`    |
| Read the ETag             | `store.getMetadata(key)`                                   | `head(pathname)`, or `result.blob.etag` from `get()`        |
| Delete                    | `store.delete(key)`                                        | `del(pathname)`                                             |
| Copy or move              | `get()`, then `set()`                                      | `copy()` or `rename()`                                      |

The Netlify script opens a store, writes a JSON record, reads it, and deletes it:

```javascript
import { getStore } from '@netlify/blobs';

const store = getStore('user-settings');

await store.setJSON('user-123', { theme: 'dark' });

const settings = await store.get('user-123', { type: 'json' });
console.log(settings?.theme);

await store.delete('user-123');
```

The Vercel version performs the same operations in a private Blob store:

```javascript
import { del, get, put } from '@vercel/blob';

const pathname = 'user-settings/user-123';

await put(pathname, JSON.stringify({ theme: 'dark' }), {
  access: 'private',
  contentType: 'application/json',
  allowOverwrite: true,
});

const result = await get(pathname, { access: 'private' });
const settings = result ? await new Response(result.stream).json() : null;
console.log(settings?.theme);

await del(pathname);
```

Save the Vercel script as `blob.mjs`, then run it with the environment file loaded:

```bash
node --env-file=.env.local blob.mjs
```

The script prints `dark`, then deletes the blob.

#### Overwrites, missing blobs, and return values

Netlify's `set()` replaces an existing key. Vercel's `put()` fails when the pathname exists, so add `allowOverwrite: true` to every call that replaces a `set()` or `setJSON()` on a key your application updates.

Both `store.get()` and Vercel's `get()` return `null` for a missing blob, and both delete calls succeed. For metadata reads, Netlify's `getMetadata()` returns `null`, while Vercel's `head()` throws `BlobNotFoundError`.

`set()` resolves to `{ modified, etag }`. `put()` resolves to an object with `url`, `downloadUrl`, `pathname`, `contentType`, `contentDisposition`, and `etag`. The `access` option on `put()`, `get()`, `copy()`, and `rename()` must match the store's access mode. `head()`, `list()`, and `del()` take no `access` option.

#### Content types and streams

Netlify's `get()` returns the type you request. Vercel's `get()` returns a `ReadableStream` in `result.stream` and the stored content type in `result.blob.contentType`. Wrap the stream in a `Response` to read it as text, JSON, bytes, or a `Blob`.

`put()` accepts a string, `ArrayBuffer`, `Blob`, or `ReadableStream`, and infers the content type from the pathname's extension. Pass `contentType` for keys without an extension, such as JSON records.

### 5\. Replace listing and bulk deletes

Netlify's `list()` fetches every page of a store before it returns. Vercel's `list()` returns up to 1,000 blobs per call, so loop until the result has no `cursor`.

This Netlify call lists the keys under a prefix in the `billing` store:

```javascript
const store = getStore('billing');

const { blobs } = await store.list({ prefix: 'invoices/' });
for (const { key } of blobs) console.log(key);
```

On Vercel, include the store name in the prefix and request each page:

```javascript
import { list } from '@vercel/blob';

let cursor;
do {
  const page = await list({ prefix: 'billing/invoices/', cursor });
  for (const blob of page.blobs) console.log(blob.pathname);
  cursor = page.cursor;
} while (cursor);
```

The loop prints pathnames such as `billing/invoices/2026-11.pdf` in lexicographical order. Vercel entries include `pathname`, `url`, `size`, `uploadedAt`, and `etag`, while Netlify entries hold `key` and `etag`. Remove the store prefix when your calling code expects the original Netlify keys.

#### List folders

Replace `directories: true` with `mode: 'folded'`, and read `folders` in place of `directories`:

```javascript
const { folders, blobs } = await list({
  mode: 'folded',
  prefix: 'billing/',
});
```

Folder names and pathnames in a folded result include the prefix. To replace `listStores()` when each Netlify store is a prefix, call `list({ mode: 'folded' })` without a prefix and read the top-level `folders`. Follow each returned `cursor` when you need every folder or store prefix.

#### Delete every blob under a prefix

Vercel Blob has no equivalent to `store.deleteAll()`. List the prefix and pass each page of URLs to `del()`:

```javascript
import { setTimeout as delay } from 'node:timers/promises';
import { BlobServiceRateLimited, del, list } from '@vercel/blob';

async function withRateLimitRetry(operation) {
  for (;;) {
    try {
      return await operation();
    } catch (error) {
      if (!(error instanceof BlobServiceRateLimited)) throw error;
      await delay(Math.max(1, error.retryAfter) * 1000);
    }
  }
}

let cursor;
do {
  const page = await withRateLimitRetry(() =>
    list({ prefix: 'sessions/', cursor, limit: 10 }),
  );
  const urls = page.blobs.map((blob) => blob.url);
  if (urls.length) await withRateLimitRetry(() => del(urls));
  cursor = page.cursor;
  await delay(1000);
} while (cursor);
```

This loop deletes up to 10 blobs per batch and waits 1 second between batches. Each deleted blob counts toward the Advanced Operations rate limit even though deletion is free; the listing also uses an operation. The retry helper handles rate limits on both calls. Other operations can consume the available rate limit, so reduce the batch size or increase the delay when needed. To empty a whole Blob store, run `vercel blob empty-store` from the linked project.

### 6\. Replace conditional writes and consistency options

Netlify reports a failed write condition by resolving with `modified: false`. Vercel Blob throws an error, so replace checks of `modified` with `try` and `catch`.

#### Replace onlyIfMatch with ifMatch

On Netlify, `onlyIfMatch` writes only when the stored ETag matches the one you read:

```javascript
const entry = await store.getWithMetadata('config', { type: 'json' });

const { modified } = await store.setJSON(
  'config',
  { ...entry.data, version: 2 },
  { onlyIfMatch: entry.etag },
);
if (!modified) {
  // Another writer changed the blob. Read it again and retry.
}
```

On Vercel, pass the ETag as `ifMatch` and catch `BlobPreconditionFailedError`:

```javascript
import { BlobPreconditionFailedError, get, put } from '@vercel/blob';

const current = await get('app/config', {
  access: 'private',
  useCache: false,
});
if (!current) throw new Error('app/config not found');
const config = await new Response(current.stream).json();

try {
  await put('app/config', JSON.stringify({ ...config, version: 2 }), {
    access: 'private',
    contentType: 'application/json',
    ifMatch: current.blob.etag,
  });
} catch (error) {
  if (!(error instanceof BlobPreconditionFailedError)) throw error;
  // Another writer changed the blob. Read it again and retry.
}
```

Passing `ifMatch` allows the overwrite, so the call needs no `allowOverwrite` option. `ifMatch` is also available on `copy()`, `rename()`, and `del()` for a single blob. ETags are specific to each provider. Discard ETags your application stored from Netlify Blobs, and read new ones from Vercel Blob after the copy.

#### Replace onlyIfNew

By default, `put()` rejects an existing pathname. Omit `allowOverwrite` when a write must not replace an existing file, and let failures reach the caller until your application has an explicit recovery path. This example assumes that `reportBody` holds the file's content:

```javascript
import { put } from '@vercel/blob';

await put('reports/2026-11.pdf', reportBody, { access: 'private' });
```

Netlify's `onlyIfNew` is an atomic conditional write. Vercel's default provides overwrite protection, so don't use this replacement as a lock. Use a Redis key with `NX` or another documented atomic operation when concurrent callers must claim a key exclusively. Finding an existing blob after an error does not prove that the failed request was a conflict.

#### Replace conditional reads

Netlify's `getWithMetadata(key, { etag })` returns `data` of `null` when the ETag matches. On Vercel, pass the ETag as `ifNoneMatch`. A match returns a `statusCode` of 304 with a `stream` of `null`:

```javascript
const result = await get('app/config', {
  access: 'private',
  ifNoneMatch: previousEtag,
});
if (result?.statusCode === 304) {
  // The blob is unchanged. Use your cached copy.
}
```

#### Replace consistency settings

Netlify's `consistency: 'strong'` option maps to `useCache: false` on `get()` for private stores. A consistent read comes from the origin, so it is slower and incurs Fast Origin Transfer on each request. Use it for read-modify-write sequences, and keep the default for other reads.

Vercel's CDN caches private and public blobs for up to 1 month by default. An overwrite or delete can take up to 60 seconds to leave the cache, which matches the 60-second propagation window of Netlify's eventual consistency. A blob written to a new pathname has no cached copy, so the first read returns the new content.

Public stores have no cache bypass. For public files that change, write each version to a new pathname with `addRandomSuffix: true` and save the returned `url`, or lower `cacheControlMaxAge` to its 60-second minimum. Browsers also keep their own cached copy until it expires.

### 7\. Replace blob delivery and upload functions

Netlify Blobs has no public URLs and no browser upload path, so your application uses functions to return blobs and to receive uploads. On Vercel, keep that pattern for a private store, or replace it with blob URLs and client uploads.

#### Serve private blobs from a function

This Netlify function reads a blob and returns it as the response:

```javascript
import { getStore } from '@netlify/blobs';

export default async (request, context) => {
  const file = await getStore('file-uploads').get(context.params.key, {
    type: 'stream',
  });
  if (!file) return new Response('Not found', { status: 404 });
  return new Response(file);
};

export const config = { path: '/files/:key' };
```

On Vercel, authenticate the caller and look up an owned file record before calling `get()`. The route accepts a file ID and reads the record's stored pathname, preventing callers from selecting arbitrary private blobs. Create the handler in your Next.js App Router project:

The Blob SDK doesn't supply your application's authentication or database functions. Implement `getCurrentUser` in `@/lib/auth` to return the signed-in user's ID as `{ id: string }` or `null`. In `@/lib/files`, implement `findFileForUser` to return an owned file record with its `pathname`, or `null`.

```typescript
import { get } from '@vercel/blob';
import { getCurrentUser } from '@/lib/auth';
import { findFileForUser } from '@/lib/files';

export async function GET(
  request: Request,
  { params }: { params: Promise<{ fileId: string }> },
) {
  const user = await getCurrentUser(request);
  if (!user) return new Response('Unauthorized', { status: 401 });

  const { fileId } = await params;
  const file = await findFileForUser(fileId, user.id);
  if (!file) return new Response('Not found', { status: 404 });

  const result = await get(file.pathname, { access: 'private' });
  if (!result || result.statusCode !== 200) {
    return new Response('Not found', { status: 404 });
  }

  return new Response(result.stream, {
    headers: {
      'Content-Type': result.blob.contentType,
      'Content-Disposition': result.blob.contentDisposition || 'attachment',
      'Content-Security-Policy': "default-src 'none'; sandbox",
      'X-Content-Type-Options': 'nosniff',
      'Cache-Control': 'private, no-cache',
    },
  });
}
```

The route returns HTTP 401 without a session and HTTP 404 for an unowned or missing file. Successful responses preserve the blob's content type and disposition, with an attachment fallback and browser restrictions for uploaded content. Keep the permission check and these headers when adapting the handler to another framework.

To let the browser download directly from Blob, perform the same permission check before creating a [signed URL](https://vercel.com/docs/vercel-blob/vercel-signed-urls) with `issueSignedToken()` and `presignUrl()`. Anyone with the URL can use it until it expires, for up to 7 days.

#### Serve public blobs by URL

In a public store, each blob has a URL on `https://<store-id>.public.blob.vercel-storage.com`. Save the `url` that `put()` returns and use it in your pages, which removes the delivery function. With the default `addRandomSuffix: false`, the URL is predictable from the pathname. Pass `addRandomSuffix: true` for URLs that are hard to guess.

Browsers display images, video, audio, PDF, plain text, JSON, and `text/xml` blobs inline and download other types. A public store can't host HTML pages. To render blob images with `next/image`, add the store's hostname to `images.remotePatterns` in your Next.js configuration.

#### Replace upload functions

A Netlify upload function receives the file and writes it with `set()`:

```javascript
import { getStore } from '@netlify/blobs';

export default async (request) => {
  const form = await request.formData();
  const file = form.get('file');

  await getStore('file-uploads').set(file.name, file);
  return new Response('Uploaded');
};
```

The same server upload works on Vercel with `put()`, subject to the 4.5 MB request body limit for Vercel Functions. For larger files, use a client upload: `upload()` requests a token from your route, then sends the file directly to Blob. The Function body limit does not apply to that file transfer. In this example, `file` comes from a file input and `userId` is the signed-in user's ID from your application session:

```javascript
import { upload } from '@vercel/blob/client';

const filename = file.name.replace(/[^a-zA-Z0-9._-]/g, '_');
const pathname = `file-uploads/${encodeURIComponent(userId)}/` +
  `${crypto.randomUUID()}-${filename}`;
const blob = await upload(pathname, file, {
  access: 'private',
  handleUploadUrl: '/api/upload',
});
```

The token route checks the session and permits only a filename under that user's upload prefix. The prefix organizes files; the server's session check enforces who may upload there. Use the `getCurrentUser` adapter described above, and implement `saveUploadedFile` in `@/lib/files` as an idempotent upsert of `{ userId, pathname, url }`. Save this handler as `app/api/upload/route.ts`:

```typescript
import { handleUpload, type HandleUploadBody } from '@vercel/blob/client';
import { getCurrentUser } from '@/lib/auth';
import { saveUploadedFile } from '@/lib/files';

class UploadRequestError extends Error {
  constructor(message: string, readonly status: number) {
    super(message);
  }
}

function ownsUploadPath(userId: string, pathname: string) {
  const prefix = `file-uploads/${encodeURIComponent(userId)}/`;
  return pathname.length <= 950 && pathname.startsWith(prefix) &&
    /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(pathname.slice(prefix.length));
}

export async function POST(request: Request) {
  let persistenceFailed = false;

  try {
    const body = (await request.json()) as HandleUploadBody;
    if (!body || !['blob.generate-client-token', 'blob.upload-completed']
      .includes(body.type)) {
      throw new UploadRequestError('Invalid upload request', 400);
    }

    const response = await handleUpload({
      body,
      request,
      onBeforeGenerateToken: async (pathname) => {
        const user = await getCurrentUser(request);
        if (!user) throw new UploadRequestError('Unauthorized', 401);
        if (!ownsUploadPath(user.id, pathname)) {
          throw new UploadRequestError('Forbidden pathname', 403);
        }
        return {
          allowedContentTypes: ['image/*', 'application/pdf'],
          maximumSizeInBytes: 50 * 1024 * 1024,
          tokenPayload: JSON.stringify({ userId: user.id }),
        };
      },
      onUploadCompleted: async ({ blob, tokenPayload }) => {
        const payload = JSON.parse(tokenPayload || 'null');
        if (!payload || typeof payload.userId !== 'string' ||
          !ownsUploadPath(payload.userId, blob.pathname)) {
          throw new UploadRequestError('Invalid upload identity', 400);
        }
        try {
          await saveUploadedFile({
            userId: payload.userId,
            pathname: blob.pathname,
            url: blob.url,
          });
        } catch (error) {
          persistenceFailed = true;
          throw error;
        }
      },
    });

    return Response.json(response);
  } catch (error) {
    const status = persistenceFailed ? 503 :
      error instanceof UploadRequestError ? error.status : 400;
    return Response.json({ error: persistenceFailed
      ? 'Upload record could not be saved; retry the callback'
      : 'Upload request rejected' }, { status });
  }
}
```

After the upload, `upload()` returns the same fields as `put()`, including `url` and `pathname`. The signed `tokenPayload` carries the authenticated user ID to `onUploadCompleted`. That callback runs independently of the browser session and may be retried, so it validates the payload and upserts the file record. Database failures return HTTP 503 to allow a retry; invalid browser requests return a 4xx response.

`handleUpload()` requires the `BLOB_READ_WRITE_TOKEN` added in step 2. With OIDC credentials only, use [presigned uploads](https://vercel.com/docs/vercel-blob/vercel-signed-urls) with `uploadPresigned()` and `handleUploadPresigned()` instead.

For an application on Netlify or another host, return the public endpoint URL as `callbackUrl` from `onBeforeGenerateToken`. You can instead set `VERCEL_BLOB_CALLBACK_URL` to the application's public origin and let the SDK append the request path. Completion callbacks require a publicly reachable endpoint, so test them in a Preview deployment instead of localhost.

### 8\. Copy existing blobs to Vercel Blob

Vercel Blob can't read a Netlify store, and Netlify documents no bulk export, so copy each store with a script that reads through Netlify's API and writes to Vercel Blob. The script skips deploy-specific stores, because their data belongs to one Netlify deploy.

Choose these settings before running the copy. The script passes your Netlify project ID and personal access token to `getStore()` because the client does not read `NETLIFY_SITE_ID` or `NETLIFY_AUTH_TOKEN` automatically.

| Setting            | How to choose it                                                                                                                                                                  |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Netlify region     | Set `region` to the value your application uses. The example uses `us-east-2`; another region can contain different data under the same store name.                               |
| Destination access | Match the Blob store's access mode.                                                                                                                                               |
| Content type       | Preserve the type your application serves. Pass `contentType` for extensionless keys, including `application/json` for JSON records.                                              |
| Multipart upload   | Keep `multipart: true` for streaming large files. Each upload uses at least three Advanced Operations. For many small files, remove it to use a single upload operation per file. |

The script validates every pathname and checks for collisions before uploading. If a key fails preflight, define its mapping in both the application module and this script, then repeat the checks. Reserve any [metadata namespace](#custom-metadata) before copying.

Save this script as `copy-blobs.mjs` in the linked project directory, and replace `your_store_name_here` with a Netlify store name:

```javascript
import { randomUUID } from 'node:crypto';
import { appendFile, writeFile } from 'node:fs/promises';
import { getStore } from '@netlify/blobs';
import { put } from '@vercel/blob';

const storeName = 'your_store_name_here';
const region = 'us-east-2';
const siteID = process.env.NETLIFY_SITE_ID;
const manifestPath = `copy-manifest-${randomUUID()}.jsonl`;

const source = getStore({
  name: storeName,
  siteID,
  token: process.env.NETLIFY_AUTH_TOKEN,
  region,
});

function toPathname(storeName, key) {
  const pathname = `${storeName}/${key}`;
  if (
    pathname.length > 950 ||
    pathname.includes('//') ||
    /[\x00-\x1f\x7f-\x9f]/.test(pathname)
  ) {
    throw new Error(
      `Define a pathname mapping for ${JSON.stringify({ storeName, key })}`,
    );
  }
  return pathname;
}

const { blobs } = await source.list();
const pathnames = new Set();
for (const { key } of blobs) {
  const pathname = toPathname(storeName, key);
  if (pathnames.has(pathname)) {
    throw new Error(`Duplicate destination pathname: ${pathname}`);
  }
  pathnames.add(pathname);
}

await writeFile(manifestPath, '', { flag: 'wx' });
console.log(`Copying ${blobs.length} blobs from ${storeName}`);
for (const { key } of blobs) {
  const entry = await source.getWithMetadata(key, { type: 'stream' });
  if (!entry) throw new Error(`Source changed during copy: ${key}`);

  const copied = await put(toPathname(storeName, key), entry.data, {
    access: 'private',
    allowOverwrite: true,
    multipart: true,
  });

  await appendFile(
    manifestPath,
    JSON.stringify({
      siteID,
      region,
      store: storeName,
      key,
      pathname: copied.pathname,
      metadata: entry.metadata,
    }) + '\n',
  );
}

console.log(`Copy complete. Manifest: ${manifestPath}`);
```

Run the script with your Netlify project ID, a Netlify personal access token, and the Vercel environment file:

```bash
NETLIFY_SITE_ID=your_project_id_here \
NETLIFY_AUTH_TOKEN=your_access_token_here \
node --env-file=.env.local copy-blobs.mjs
```

#### Keep a manifest for each store and region

Run the script once for each source store and region. To find site-wide store names, call `listStores()` with the same `siteID` and `token`. Each run prints the number of blobs found and, after every upload succeeds, `Copy complete` with a unique manifest filename. Its JSONL records preserve the source project, region, store, and original key alongside the destination pathname and custom metadata.

Import metadata from the latest successfully completed manifest for each store and region before cutover. Preserve earlier manifests until that import passes verification. If a run fails, its manifest is incomplete; rerun the full store without deleting another store's export.

#### Repeat and reconcile the copy

Reruns replace existing destination blobs and copy new keys because the script enables `allowOverwrite`. They do not remove files deleted from Netlify; reconcile those within the store's destination prefix during the final copy. If the sequential copy hits a rate limit, wait at least 1 second or its `retryAfter` duration, whichever is longer, before rerunning. Keep Netlify authoritative until you complete final reconciliation.

### 9\. Verify and cut over

#### Validate the copy and application behavior

Check the copied data and run your application against Vercel Blob before switching traffic:

- Compare the complete set of source keys with the destination pathnames after applying the mapping. Exclude only the reserved metadata namespace, and reconcile files missing from either side.
  
- Compare the bytes of a representative sample of blobs. ETags differ between the two providers, so compare content.
  
- Exercise each migrated call site in a Preview deployment, including an overwrite, a missing blob, a listing of more than 1,000 blobs, and a conditional write that loses a race.
  
- Load each kind of file in a browser, and check its content type and whether it displays or downloads.
  

#### Estimate usage

Estimate storage, Simple Operations, Advanced Operations, and Blob Data Transfer with [Vercel Blob pricing](https://vercel.com/docs/vercel-blob/usage-and-pricing). Include the initial copy, verification reads, and any repeat runs. Multipart uploads and TTLs add operations; deletes are free but still count toward operation rate limits.

Each Blob URL request counts as a CDN Request. Fast Origin Transfer applies on cache misses. Streaming private files through a Function also adds the Function's delivery and compute usage, so include the complete delivery path in your estimate.

#### Copy final changes and switch traffic

Keep Netlify authoritative while the initial copy runs. For the final copy, pause writes and wait for in-flight writes to finish:

1. Record which provider serves each store and pause writes to the store being migrated.
   
2. Run the copy again. Reconcile deleted keys only within that store's destination prefix, and import its custom metadata into the replacement used by the application.
   
3. Compare the complete source and destination key sets, then verify copied content, metadata, and access checks. Use `useCache: false` when verifying private blobs that were overwritten.
   
4. While writes remain paused, switch the storage module to Vercel Blob. Resume writes and monitor application output and errors.
   

If writes must continue during the copy, record every create, replacement, metadata update, rename, and delete in a durable ordered change log. Replay those changes after the copy, then pause writes while you drain and verify the log and switch providers. Writing to both providers alone does not prevent an older copied value from replacing a newer one.

#### Keep a rollback path until cleanup

To roll back after Vercel has accepted writes, pause writes and keep reads on Vercel while you reconcile the Netlify store. Copy new and updated blobs back with `list()` and `get()`, bypassing the private read cache with `useCache: false`. Restore each file's custom metadata from the application's database or sidecar.

Netlify's `set()` requires a supported body such as an `ArrayBuffer`. Converting the returned stream to that type buffers the entire file, so run the reverse copy with enough memory for the largest object.

Reconcile deletions against the tracked changes or a complete inventory of the migrated namespace so deleted files do not reappear. Verify the restored keys, content, metadata, and access checks before switching the flag to Netlify Blobs and resuming writes. Retain both providers' data until the rollback period ends.

After that period, remove resources used only by the migrated stores:

- Remove unused `@netlify/blobs` calls, the provider flag, and the package.
  
- Delete each migrated site-wide store with `store.deleteAll()` or from the Netlify UI. Site-wide data stays on Netlify until you delete it.
  
- Revoke the Netlify personal access token you created for the copy.
  
- Delete the completed copy manifests only after importing their metadata into its [replacement](#custom-metadata), verifying the import, and ending the rollback period.
  

## What doesn't map from Netlify Blobs

These features need a different design on Vercel. Run the examples from the linked project directory with the latest Vercel CLI.

### Custom metadata

Vercel Blob has no equivalent to the `metadata` option on `set()` and `setJSON()`, or to the `metadata` that `getWithMetadata()` and `getMetadata()` return. `head()` returns system fields only, including `size`, `uploadedAt`, `contentType`, `cacheControl`, and `etag`. Choose a replacement based on how your application uses each metadata field:

| On Netlify Blobs                                                     | On Vercel                                                                   |
| -------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| Fields you query or filter by, such as an owner ID or a status       | A database row keyed by the blob's pathname                                 |
| Fields you read together with the file, such as an original filename | Sidecar JSON in a reserved metadata prefix                                  |
| A content type                                                       | `contentType` on `put()`                                                    |
| An expiry timestamp your code checks                                 | `ttlDays` on `put()`, from 1 to 730 days, or `setTtl()` on an existing blob |
| A short label, such as a tenant ID or a version                      | A segment of the pathname                                                   |

Reserve a metadata prefix that contains no application files before copying data. The example uses `__blob_metadata__/`; exclude that prefix from ordinary file listings and include it in backup and deletion logic. If the prefix is already in use, choose another one and record it in the storage module.

Preflight every complete sidecar pathname, including the prefix and suffix, against the 950-character limit and the file mapping. Use a database record when you cannot guarantee a valid, collision-free name. This example assumes that `fileBody` holds the file's content:

```javascript
import { get, put } from '@vercel/blob';

const pathname = 'file-uploads/report.pdf';
const metadataPathname = `__blob_metadata__/${pathname}.json`;
if (
  metadataPathname.length > 950 || metadataPathname.includes('//') ||
  /[\x00-\x1f\x7f-\x9f]/.test(metadataPathname)
) {
  throw new Error('Use a database record for this metadata');
}

await put(pathname, fileBody, { access: 'private', allowOverwrite: true });
await put(metadataPathname, JSON.stringify({ uploadedBy: 'user-123' }), {
  access: 'private',
  contentType: 'application/json',
  allowOverwrite: true,
});

const sidecar = await get(metadataPathname, { access: 'private' });
const metadata = sidecar ? await new Response(sidecar.stream).json() : {};
console.log(metadata.uploadedBy);
```

The example prints `user-123`. The file and metadata writes aren't atomic. Filter the reserved metadata prefix out of application file listings, and make updates and deletions handle both objects. Load the metadata from the completed copy manifests into this replacement before cutover.

### Deploy-specific stores and file-based uploads

Vercel Blob has no equivalent to `getDeployStore()`. Blob stores outlive deployments, so rolling back a deployment does not restore their data and deleting a deployment leaves that data in place.

For data that belongs to one deployment, prefix its pathnames with `VERCEL_DEPLOYMENT_ID`, a system environment variable available at build time and at runtime. Keep each prefix while its deployment can serve traffic or be restored. Delete the prefix after retiring the deployment and ending its rollback period. Use `ttlDays` only for data with an intentional lifetime that does not depend on the deployment staying available.

Vercel Blob also has no equivalent to files in `.netlify/blobs/deploy`. Upload build output from a script that runs after your build command, such as `next build && node scripts/upload-blobs.mjs` in the `build` script of `package.json`. The build environment includes `VERCEL_OIDC_TOKEN`, so the script needs no token for a store connected to the project:

```javascript
import { readFile } from 'node:fs/promises';
import { put } from '@vercel/blob';

const prefix = `deploys/${process.env.VERCEL_DEPLOYMENT_ID}`;

const blob = await put(
  `${prefix}/search-index.json`,
  await readFile('./dist/search-index.json'),
  { access: 'private', contentType: 'application/json' },
);
console.log(blob.pathname);
```

The script prints a pathname such as `deploys/dpl_example/search-index.json`. Vercel provides `VERCEL_DEPLOYMENT_ID` for its builds and deployments, so skip this upload during local builds. Read the file at runtime with `get()` and the same deployment prefix. Public images and fonts can ship as static assets with your deployment.

Netlify's Next.js adapter also writes prerendered pages and cache entries to deploy-specific stores. Leave those stores on Netlify, because Vercel builds and caches that content when you deploy the application.

### Key/value data

Netlify Blobs often holds small records that change frequently, such as sessions, counters, or feature settings. Vercel Blob is file storage, where each `put()` and `list()` call is an Advanced Operation, and the CDN caches reads.

Move application key/value data to a Redis integration such as [Upstash Redis](https://vercel.com/marketplace/upstash/upstash-kv) from the Vercel Marketplace, and small, read-heavy configuration to [Global Config](https://vercel.com/docs/global-config). Keep files, documents, and large JSON payloads on Vercel Blob.

### Local development sandbox

Netlify Dev uses a sandboxed local store and can't read production data. Local code on Vercel uses the credentials from `vercel env pull`, so it reads and writes the Blob store connected to the project's Development environment.

To keep local data separate, open the production store's **Projects** tab, select **Update Project Connection**, and remove **Development**. Then create a second store for the Development environment, and run `vercel env pull` again:

```bash
vercel blob create-store your-store-name-dev \
  --access private \
  --environment development
```

### Other SDK features

These Netlify Blobs features have a different interface on Vercel Blob, or none:

| Netlify Blobs feature                                  | On Vercel Blob                                                                                     |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| `listStores()`                                         | `list({ mode: 'folded' })` for prefixes in one store, or `vercel blob list-stores` for Blob stores |
| `connectLambda(event)` in Lambda compatibility mode    | No equivalent needed. The SDK reads credentials from the environment.                              |
| `region` option on `getStore()` and `getDeployStore()` | No equivalent. Each Blob store has one region, set at creation.                                    |
| `consistency` option on `getStore()` for a whole store | No equivalent. Pass `useCache: false` on each `get()` call.                                        |
| `BlobsServer` from `@netlify/blobs/server` for tests   | No equivalent. Test against a dedicated Blob store, or mock your storage module.                   |
| Reading a blob and writing it under a new key          | `copy()` and `rename()`, which run in the store without downloading the blob                       |
| `netlify blobs:get` with `--output`                    | `vercel blob get` with `--output` and `--access`                                                   |
| `netlify blobs:set` with `--input`                     | `vercel blob put` with a file path, `--pathname`, and `--access`                                   |

## Troubleshooting

Use these checks to diagnose changes in application behavior after migration.

| What you observe                                               | What to check                                                                                                                                                                                                       |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `put()` fails because the blob already exists                  | Netlify's `set()` overwrites, and `put()` doesn't. Pass `allowOverwrite: true`, or write to a new pathname.                                                                                                         |
| `put()`, `get()`, or `copy()` fails with an access error       | The `access` option must match the store's access mode. Check whether the store was created as private or public.                                                                                                   |
| SDK calls fail locally because no credentials are found        | Run `vercel env pull` to save `BLOB_STORE_ID` and a development OIDC token. Confirm that the store is connected to the Development environment and that your framework loads the file into the process environment. |
| SDK calls fail on a host outside Vercel                        | OIDC credentials exist only on Vercel. Copy the store's read-write token from your pulled environment file and set `BLOB_READ_WRITE_TOKEN` on your host.                                                            |
| `handleUpload()` fails in a project that uses OIDC             | `handleUpload()` requires `BLOB_READ_WRITE_TOKEN`. Add the token to the connection, or use `uploadPresigned()` and `handleUploadPresigned()`.                                                                       |
| An upload through a Function fails for a large file            | Vercel Functions have a 4.5 MB request body limit. Use a client upload with `upload()`.                                                                                                                             |
| A read returns the old content after an overwrite              | The CDN can serve the cached blob for up to 60 seconds. Pass `useCache: false` to `get()` on a private store, or write changed content to a new pathname.                                                           |
| `head()` throws where `getMetadata()` returned `null`          | `head()` throws `BlobNotFoundError` for a missing blob. Catch the error, or call `get()`, which returns `null`.                                                                                                     |
| Code that expected a string or an object receives a stream     | `get()` returns a `ReadableStream` in `result.stream`. Read it with `new Response(result.stream).text()` or `.json()`.                                                                                              |
| `list()` returns only the first 1,000 blobs                    | `list()` doesn't fetch every page. Call it again with the returned `cursor` until no cursor remains.                                                                                                                |
| Listed names include the store name                            | Pathnames include the prefix that replaced the Netlify store. Remove the prefix before comparing with Netlify keys.                                                                                                 |
| A conditional write no longer returns `modified: false`        | A failed `ifMatch` condition throws `BlobPreconditionFailedError`. Catch the error and retry with a new ETag.                                                                                                       |
| Every conditional write fails after the copy                   | ETags are specific to each provider. Read the ETag from Vercel Blob with `get()` or `head()` before writing.                                                                                                        |
| `metadata` is `undefined` after migration                      | Vercel Blob stores no custom metadata. See the [metadata alternatives](#custom-metadata).                                                                                                                           |
| A JSON blob downloads or has the wrong content type            | `put()` infers the type from the pathname's extension. Pass `contentType: 'application/json'` for keys without an extension.                                                                                        |
| A public file downloads in the browser when it used to display | Vercel Blob serves types other than images, video, audio, PDF, plain text, JSON, and text/xml as attachments, and it can't host HTML pages. Serve those files through your application.                             |
| The copy script throws `MissingBlobsEnvironmentError`          | The `@netlify/blobs` client found no Netlify context. Pass `siteID` and `token` to `getStore()`.                                                                                                                    |
| The copy script finds 0 blobs in a store that has data         | A site-wide store opened without `region` reads `us-east-2`. Pass the `region` your application uses.                                                                                                               |
| The copy or a bulk delete fails with `BlobServiceRateLimited`  | The run exceeded your plan's operation rate limit. Wait at least 1 second or the error's `retryAfter` seconds, whichever is longer, before retrying.                                                                |
| `onUploadCompleted` never runs during local development        | The callback doesn't run on localhost. Test it in a Preview deployment.                                                                                                                                             |

## What to build with Vercel Blob

### User uploads from the browser

Profile photos and attachments can go directly from the browser to Vercel Blob without passing through your server. Use `upload()` with a token route that checks the user’s permissions and limits the file’s type and size. Save the returned pathname in an idempotent completion callback so the application can associate each file with its owner.

Start from the [Vercel Blob Next.js Starter](https://vercel.com/templates/next.js/blob-starter), or [add private uploads to a Next.js application](https://vercel.com/kb/guide/vercel-blob-nextjs). Choose an [upload method that fits the file size](https://vercel.com/kb/guide/how-to-upload-and-store-files-with-vercel) for your application.

### Private documents with authenticated downloads

Keep invoices, contracts, and receipts in a private store. Your delivery route must check permission for the requested file before reading it; a user’s pathname prefix organizes files but does not enforce access. For temporary sharing, issue a signed URL after the same permission check and treat it as a bearer link until it expires.

Build a [private file upload application](https://vercel.com/kb/prompts/build-private-file-upload-app) from an agent prompt, or [store and serve per-user files from Python](https://vercel.com/kb/guide/python-and-vercel-blob).

### AI applications and agent files

Store chat attachments, generated media, and agent-written documents under a user or run prefix, then keep their pathnames with the conversation records. Private storage can also hold agent memory between sessions. When a model needs a URL for private input media, use a signed URL with enough lifetime for the model to fetch it instead of making the whole store public.

Deploy the [Chatbot template](https://vercel.com/templates/next.js/chatbot) for file attachments or the [eve Memory Agent](https://vercel.com/templates/eve/eve-memory-agent) for persistent memory. The [memory-provider comparison](https://vercel.com/kb/guide/choose-an-eve-memory-provider) explains the storage choice, and the [Slack file-management bot](https://vercel.com/kb/guide/slack-bot-vercel-blob) connects file operations to an agent’s tools.

### Images, video, and large media

Public stores serve images and video by URL. Use `multipart: true` for large uploads and report progress with `onUploadProgress`; range requests let a video player seek without downloading the whole file. Blobs over 512 MB remain accessible but aren’t cached by Vercel’s CDN, so plan for origin reads.

Deploy an [image gallery](https://vercel.com/templates/next.js/image-gallery-starter), build [image hosting with Nuxt](https://vercel.com/kb/guide/vercel-blob-nuxt-imgur-clone), or follow the Next.js guidance on [serving video](https://nextjs.org/docs/app/guides/videos). For processing before delivery, [transform uploads in Vercel Sandbox](https://vercel.com/kb/guide/user-uploaded-files-vercel-sandbox-and-blob) and save the results in Blob.

### Generated reports and temporary exports

Workflows and scheduled jobs can write reports or rendered media that remain available after the job ends. Use a job-specific pathname and an explicit overwrite policy for retries, then deliver the finished file through the application’s access checks. Temporary exports can use `ttlDays`, which deletes files on a daily schedule rather than at an exact time of day.

Run a [research agent that saves its report to Blob](https://vercel.com/kb/guide/how-to-run-a-multi-step-research-agent-on-vercel), or render video with [Remotion on Vercel](https://vercel.com/templates/next.js/remotion-on-vercel). If a job replaces an export, check the [TTL behavior and overwrite rules](https://vercel.com/changelog/vercel-blob-now-supports-ttls-for-automatic-deletion).

## Next steps

- Choose the appropriate delivery behavior for [private](https://vercel.com/docs/vercel-blob/private-storage) and [public](https://vercel.com/docs/vercel-blob/public-storage) files
  
- Use [client uploads](https://vercel.com/docs/vercel-blob/client-upload) for browser uploads or [signed URLs](https://vercel.com/docs/vercel-blob/vercel-signed-urls) for temporary access
  
- Look up methods in the [JavaScript](https://vercel.com/docs/vercel-blob/using-blob-sdk) and [Python](https://vercel.com/docs/vercel-blob/python-sdk-reference) SDK references
  
- Manage stores and files with the [Blob CLI](https://vercel.com/docs/cli/blob)
  
- Review [authentication and firewall controls](https://vercel.com/docs/vercel-blob/security), then estimate [usage and costs](https://vercel.com/docs/vercel-blob/usage-and-pricing)
  
- Move the rest of your application with the [Netlify migration steps](https://vercel.com/kb/guide/migrate-to-vercel-from-netlify)
  

## Related resources

- Plan application storage with the [complete Blob guide](https://vercel.com/kb/guide/vercel-blob)
  
- Use [server uploads](https://vercel.com/docs/vercel-blob/server-upload) for files generated or received by your backend
  
- Supply input images for [AI Gateway video generation](https://vercel.com/docs/ai-gateway/modalities/video-generation/image-to-video)
  
- See how [Superset stores artifacts from agents and users](https://vercel.com/customers/how-superset-built-the-ide-for-ai-agents-on-vercel)
  
- Build a [research workspace that saves its artifacts](https://vercel.com/kb/guide/run-research-workspace-vercel)
  
- Adapt the [Blob backup examples](https://vercel.com/docs/vercel-blob/examples) for scheduled exports
  

## Frequently asked questions

### Can I move Netlify Blobs data to Vercel Blob directly?

No. Vercel Blob can't read a Netlify store, and Netlify documents no bulk export. Copy each store with a script that calls `list()` and `getWithMetadata()` from `@netlify/blobs`, then writes each blob with `put()` from `@vercel/blob`.

### Can my application stay on Netlify after I migrate to Vercel Blob?

Yes. The `@vercel/blob` SDK works from any JavaScript or TypeScript backend with a `BLOB_READ_WRITE_TOKEN`. Applications deployed on Vercel authenticate with the project's OIDC token instead.

### Should I create a private or a public Blob store?

Create a private store for data that only your server code or authorized users read, which matches how Netlify Blobs works. Create a public store for files any visitor can load by URL, such as avatars and product images. You can't change the access mode after you create the store.

### Is there a Vercel Blob equivalent to getStore() in Netlify Blobs?

Not as a function. Use a pathname prefix for each Netlify store inside one Blob store, such as `uploads/photo.jpg`, or create a separate Blob store for data that needs its own access mode or region.

### Does Vercel Blob support custom metadata like Netlify Blobs?

No. Vercel Blob returns system fields such as `size`, `contentType`, and `etag`, and it has no field for arbitrary metadata. Keep custom fields in a database row keyed by pathname, a JSON sidecar under a reserved metadata prefix, or the pathname. Verify that all exported metadata has reached its replacement before cutover.

### Does Vercel Blob’s put() overwrite files like Netlify’s set()?

Not by default. `put()` fails when the pathname exists. Pass `allowOverwrite: true` to replace the blob, or `ifMatch` with an ETag to replace it only when it hasn't changed.

### Does Vercel Blob have a strong consistency option?

Yes, for private stores. Pass `useCache: false` to `get()` to read from the origin and skip the CDN cache. Public stores have no cache bypass, so write changed content to a new pathname or set a short `cacheControlMaxAge`.

### Can I use Netlify Blobs and Vercel Blob together?

Yes. The `@netlify/blobs` and `@vercel/blob` SDKs are independent, so one application can call both. For example, move user uploads to Vercel Blob and keep deploy-specific stores on Netlify while the site is hosted there.

### Is there a Vercel Blob equivalent to deploy-specific stores?

No. Blob stores outlive deployments. Use `VERCEL_DEPLOYMENT_ID` as a pathname prefix for deployment-specific data, then delete that prefix after retiring the deployment and ending its rollback period.

### How large can a file be on Vercel Blob?

Up to 5 TB, compared with 5 GB for a Netlify Blobs object. Use multipart uploads for files above 100 MB, and client uploads for files above the 4.5 MB request body limit of a Vercel Function.

## Related Resources

- [Vercel Blob vs Netlify Blobs](/kb/guide/vercel-blob-vs-netlify-blobs): Compare Vercel Blob and Netlify Blobs on storage model, public URLs, delivery, limits, and pricing to choose the right object or key/value store for your app.

## More Vercel Blob guides

- [Migrate from Supabase Storage to Vercel Blob](/kb/guide/migrate-from-supabase-storage-to-vercel-blob): Migrate from Supabase Storage to Vercel Blob in TypeScript or Python, including buckets, uploads, public and signed URLs, access rules, and a staged cutover.
- [Migrate from Upstash Blob to Vercel Blob](/kb/guide/migrate-from-upstash-blob-to-vercel-blob): Migrate from Upstash Blob to Vercel Blob in TypeScript or Python, including Blob stores, browser uploads, private files, signed URLs, object copies, and a staged cutover.
- [Migrate from Cloudflare R2 to Vercel Blob](/kb/guide/migrate-from-cloudflare-r2-to-vercel-blob): Migrate from Cloudflare R2 to Vercel Blob, including S3 API and Workers binding calls, public and private access, signed URLs, client uploads, copying existing objects, and a staged cutover.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```
