Standard
App assets · media · live datasets
Read often. No retrieval fee.
$0.015 / GB-month
- Writes · Class A
- $4.50 / M
- Reads · Class B
- $0.36 / M
- Retrieval fee
- None
Monthly Standard free tier applies.
Store files, media, logs, model artifacts, and datasets — without paying egress charges when data leaves R2. S3-compatible API, globally available, bound directly to Workers.
Moving data should open up options, not add a bill. R2 removes the per-GB charge when data leaves R2. Storage and requests are still billed.
Most object stores charge per GB when data leaves. R2 doesn't.
Every provider charges for requests. Example: 1 million reads, before free tiers.
Same example: 1,000 GB transferred out. Same scale as the request bars.
*Typical-provider rates are illustrative, not a quote. Destinations can be users, other clouds or analytics tools. R2 storage, requests and IA retrieval are billed separately; other services have their own pricing.
From app uploads to model weights, R2 stores any file type. Each object is bytes plus a key and metadata — including the Content-Type (MIME type) you set. R2 doesn't restrict or convert file formats.
These are examples, not a supported-formats list.
No conversion. Your bytes stay your bytes.
Photos, graphics & app uploads
Media files, HLS playlists & segments
Reports, spreadsheets & user files
Pages, scripts & build artifacts
Datasets · Iceberg tables via Basin Catalog
Model weights & training datasets
Event logs, archives & database dumps
Custom format? No extension?
It's still an object.
On upload, set Content-Type for correct rendering and Cache-Control for caching; use Content-Disposition to control downloads.
Any format, same transfer policy: no egress fee from R2 itself. Storage and requests are billed separately.
R2 exposes a standard object-storage API. Coming from S3? Your existing SDKs and tools work with a config swap. Starting fresh? The Workers binding is simpler — no credentials, no endpoint config needed.
R2 is accessible via a Workers binding (native, no credentials) or via the S3-compatible API (for existing tools, SDKs, and migration patterns). You don't need an S3 background to use R2 — the Workers binding is often the better starting point for new code.
Workers binding — the native path.
Declare the bucket in wrangler.toml,
access via env.BUCKET.
No credentials, no endpoint config, no SDK to configure.
// Workers binding — simplest path
const obj = await env.BUCKET.get(key);
await env.BUCKET.put(key, body, { httpMetadata });
S3-compatible endpoint — for existing tooling.
If you already use S3 SDKs, CLIs, or are migrating from S3/GCS, point them at the R2 endpoint.
Region is almost always auto.
// S3-compatible endpoint
https://<ACCOUNT_ID>.r2.cloudflarestorage.com
// AWS SDK v3 (swap endpoint + credentials only)
const client = new S3Client({
region: "auto",
endpoint: "https://<ACCOUNT_ID>.r2.cloudflarestorage.com",
credentials: { accessKeyId, secretAccessKey },
});
Read it often or keep it for later? Choose the storage class to match.
Choose by how often you read, not how quickly you need access. Standard for everyday use. Infrequent Access for data you rarely read. Both stay instantly available.
App assets · media · live datasets
Read often. No retrieval fee.
$0.015 / GB-month
Monthly Standard free tier applies.
Backups · old logs · archives · compliance copies
Cheaper to keep. Costs more to read.
$0.01 / GB-month
30-day minimum storage · no free tier.
Rule of thumb: IA pays off when an object is read in full less than about once every 2 months ($0.005/GB-month saved vs $0.01/GB retrieval). Higher request fees tilt it further toward Standard.
Swipe across the drawers ↔
Day 0: New datasets and logs live in Standard, ready for everyday use.
Day 30: The example lifecycle rule moves both objects into IA.
Day 90: Old logs expire. The dataset stays in IA. You choose the rule ages.
Example ages, not defaults. Lifecycle moves objects Standard → IA only; each transition is one Class A operation.
Retrieval is not egress. IA charges $0.01 per GB retrieved, in addition to read requests. It has a 30-day minimum storage charge. R2 egress remains $0 for both classes.
The rule of thumb is a calculation, not an official threshold. IA saves $0.005 per GB-month in storage versus Standard. Divide that saving by $0.01 per GB retrieved: the storage + retrieval break-even is 0.5 full-object reads per month, or one every 2 months. Below that, IA saves on those two charges alone. Higher request prices, transition operations, the minimum storage duration and Standard free-tier allowances can change the result.
Lifecycle goes Standard → IA only. Each object transition is one Class A operation. Lifecycle cannot transition IA back to Standard. Expiration can delete old objects; DeleteObject, DeleteBucket and AbortMultipartUpload operations are free.
Now the data can move. Your storage no longer has to follow your compute.
Choose where to run the work, not where another copy of the data lives.
Swipe to explore all destinations ↔
One dataset. Multiple copies. Transfer bills in between.Store once. Use it from any cloud without a transfer bill.
R2 speaks the S3 API. Iceberg catalogs that support S3-compatible storage can point at R2 with its endpoint and an access key, and treat it like any other S3 bucket.
Apache Polaris · Project Nessie · Apache Gravitino · Iceberg JDBC / Hive catalogs
Use a custom S3 endpoint; validate your setup with R2.AWS Glue / S3 Tables · Google BigLake
Not a standard R2 path.Don't want to run a catalog at all?R2 has one built in → Basin Catalog
Your files are in R2. Now make them useful together. Basin Catalog gives your analytics tools a shared view of the same tables — without a separate catalog to run.
R2 already took away the toll. Basin Catalog adds the filing system. Two separate benefits.
Basin Catalog · formerly R2 Data Catalog
Files need a little structure before you can query them as tables. Basin Catalog is a managed Apache Iceberg REST catalog built into your R2 bucket. The files stay in R2; your tools share the table definitions.
R2 stores the data. Iceberg organizes it into tables. Basin Catalog keeps track of those tables and their current versions.
Start with your bucketnpx wrangler basin catalog enable <BUCKET_NAME>
Returns your catalog URI + warehouse name. Add an API token to connect an engine.
Basin Catalog is built into your R2 bucket. There's no catalog server to deploy, patch or scale. Turn it on with one command (npx wrangler basin catalog enable <BUCKET_NAME>) or in the dashboard; get back a catalog URI and warehouse name.
Compaction and snapshot expiration run for you once switched on. No maintenance jobs to schedule.
Speaks the open Apache Iceberg REST standard, so it isn't tied to one vendor's engine. Spark, Snowflake, Trino, DuckDB and others connect the same way.
Workers and Workers AI can use the same R2 data.
Check any that apply.
Don't see your tool? Ask your Cloudflare team.
Arrows show engine → catalog requests. Engines then read the underlying files in R2; query results are not shown.
Use the returned catalog URI + warehouse and a token with Basin Catalog and R2 permissions. Examples query an existing default.events table.
-- DuckDB 1.4+; existing Iceberg table INSTALL iceberg; LOAD iceberg; INSTALL httpfs; LOAD httpfs; CREATE SECRET r2_secret ( TYPE ICEBERG, TOKEN '<API_TOKEN>' ); ATTACH '<WAREHOUSE>' AS my_catalog ( TYPE ICEBERG, ENDPOINT '<CATALOG_URI>' ); SELECT * FROM my_catalog.default.events LIMIT 10;
from pyiceberg.catalog.rest import RestCatalog
WAREHOUSE = "<WAREHOUSE>"
CATALOG_URI = "<CATALOG_URI>"
TOKEN = "<API_TOKEN>"
catalog = RestCatalog(
name="my_catalog", warehouse=WAREHOUSE,
uri=CATALOG_URI, token=TOKEN,
)
table = catalog.load_table("default.events")
print(table.scan(limit=10).to_arrow())
-- Read-only. Create ext_vol_r2 first (see details below).
-- The external volume must use ALLOW_WRITES = FALSE.
CREATE CATALOG INTEGRATION basin_catalog
CATALOG_SOURCE = ICEBERG_REST
TABLE_FORMAT = ICEBERG
CATALOG_NAMESPACE = 'default'
REST_CONFIG = (
CATALOG_URI = '<CATALOG_URI>'
CATALOG_NAME = '<WAREHOUSE>'
)
REST_AUTHENTICATION = (
TYPE = BEARER BEARER_TOKEN = '<API_TOKEN>'
)
ENABLED = TRUE;
CREATE ICEBERG TABLE events
CATALOG = 'basin_catalog'
EXTERNAL_VOLUME = 'ext_vol_r2'
CATALOG_TABLE_NAME = 'events';
SELECT * FROM events LIMIT 10;
# Install compatible Iceberg runtime + AWS bundle; see setup docs.
from pyspark.sql import SparkSession
from os import environ
spark = (SparkSession.builder
.config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
.config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
.config("spark.sql.catalog.my_catalog.type", "rest")
.config("spark.sql.catalog.my_catalog.uri", environ["CATALOG_URI"])
.config("spark.sql.catalog.my_catalog.warehouse", environ["WAREHOUSE"])
.config("spark.sql.catalog.my_catalog.token", environ["TOKEN"])
.config("spark.sql.catalog.my_catalog.header.X-Iceberg-Access-Delegation", "vended-credentials")
.config("spark.sql.catalog.my_catalog.s3.remote-signing-enabled", "false")
.getOrCreate())
spark.sql("SELECT * FROM my_catalog.default.events LIMIT 10").show()
// Install compatible Spark / Iceberg dependencies; see setup docs.
import org.apache.spark.sql.SparkSession
val spark = SparkSession.builder()
.appName("Basin Catalog")
.config("spark.sql.extensions", "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
.config("spark.sql.catalog.my_catalog", "org.apache.iceberg.spark.SparkCatalog")
.config("spark.sql.catalog.my_catalog.type", "rest")
.config("spark.sql.catalog.my_catalog.uri", sys.env("CATALOG_URI"))
.config("spark.sql.catalog.my_catalog.warehouse", sys.env("WAREHOUSE"))
.config("spark.sql.catalog.my_catalog.token", sys.env("TOKEN"))
.getOrCreate()
spark.sql("SELECT * FROM my_catalog.default.events LIMIT 10").show()
Basin SQL is Cloudflare's serverless, distributed query engine for Iceberg tables in Basin Catalog. It runs on Cloudflare's global network, so there's no query cluster to size, start or scale.
npx wrangler basin sql query "YOUR_WAREHOUSE_NAME" "SELECT * FROM default.events LIMIT 10"Basin SQL docs ↗
Standard R2 storage rates apply. Catalog pricing ↗
Plus normal R2 storage and requests. Compaction and Basin SQL are billed separately.
Basin SQL: $0.0025 per GB scanned ($2.50/TB), 10 GB/month included. Basin SQL pricing ↗
An Iceberg table isn't one file. It's a small stack of index files on top of your real data, like a library catalog on top of the shelves.
Asking for Nov 1? The engine reads the stats and skips every file that doesn't contain Nov 1.
Reads 1 file. Skips 7.
Changes are prepared first, then switched on in one step. Readers never see a half-finished table.
Older versions stay available, so you can view the table as of last week, until cleanup removes them.
Turning on Basin Catalog doesn't turn existing Parquet files into tables. Tables appear when you create them.
For engineers: create or register with a compatible engine, or write to a Basin Pipelines Iceberg sink.
One token, two permissions: one for the catalog (the index), one for R2 storage (the files).
The Spark example assumes the Iceberg add-ons are installed and your connection details are already set. Full setup is in the Spark docs ↗.
For engineers: compatible Iceberg dependencies + connection environment variables.
Snowflake needs two things to read your tables: a map and a key.
Lets Snowflake open the files in your R2 bucket. ALLOW_WRITES = FALSE means it can read the files, never change them.
Asks Basin Catalog where each table is and which version is current.
Create the key first. Your Snowflake tables use both.
CREATE OR REPLACE EXTERNAL VOLUME ext_vol_r2
STORAGE_LOCATIONS = ((
NAME = 'r2_storage'
STORAGE_PROVIDER = 'S3COMPAT'
STORAGE_BASE_URL = 's3compat://<BUCKET_NAME>'
CREDENTIALS = (
AWS_KEY_ID = '<ACCESS_KEY_ID>'
AWS_SECRET_KEY = '<SECRET_ACCESS_KEY>'
)
STORAGE_ENDPOINT = '<ACCOUNT_ID>.r2.cloudflarestorage.com'
))
ALLOW_WRITES = FALSE;
Step 2 (the catalog integration) is in the Snowflake tab above.
Your tables have a home. Now keep them fed.
Stream events in, clean them with SQL, and land them in R2.
Formerly Cloudflare Pipelines
Valid events land in an Iceberg table (default.events) through Basin Catalog, or as Parquet / JSON files in R2.
JSON in. SQL transforms in flight. Exactly-once delivery at the sink.
npx wrangler basin pipelines setup
Streams: JSON events over an HTTP endpoint or Worker binding, up to 1 GB/s per stream. Cloudflare Logpush is another supported source.
Pipeline: use SQL to filter, validate, reshape, and enrich events. The rejected events above illustrate a validation filter, not a separate delivery destination.
Sinks: exactly-once delivery into an Iceberg table such as default.events via Basin Catalog, or into Parquet / JSON files in R2.
More events. More files. More history. Keep the tables ready for the next query.
Basin Catalog · formerly R2 Data Catalog
Compact small files, expire old snapshots, and revisit the history you keep.
Many small Parquet files → fewer, larger files.
BEFORE / 12 SMALL FILES
AFTER / 3 LARGER FILES
Target: 64–512 MB · default 128 MB
Parquet only · gauge is illustrative.
Expire only what meets both rules.
3 would expire · 5 retained.
Older than X days AND beyond the last N snapshots. Defaults: 30 days / keep 5. No extra charge.
Drag through the snapshots you retain.
As of 2026-11-06
| Event ID | Type | Region |
|---|---|---|
| ev-1001 | page_view | west |
| ev-1002 | signup | east |
| ev-1003 | purchase | central |
5 retained snapshots · 3 sample rows.
Illustrative data. Time travel only reaches snapshots that have not been expired.
$0.005/GB processed (10 GB/month included) + $2.00/M objects processed (1M/month included). Parquet only; target file size 64–512 MB, default 128 MB.
Both conditions must be met: older than the configured age and outside the most recent N snapshots. Defaults: older than 30 days, retain the last 5.
npx wrangler basin catalog compaction enable <BUCKET_NAME> --target-size 128 --token <API_TOKEN>
npx wrangler basin catalog snapshot-expiration enable <BUCKET_NAME> --token <API_TOKEN> --older-than-days 7 --retain-last 10
The snapshot-expiration command shows a custom 7-day / keep-10 policy, not the default settings used in the preview. Standard R2 storage charges still apply.
Where data lives matters. R2 gives you two distinct controls: best-effort placement hints and legally-binding jurisdictional guarantees. They are not the same thing.
eu / us / fedramp
R2 has two mechanisms for controlling where object data lives. Using the wrong one for a compliance requirement has real consequences — especially because jurisdiction cannot be changed after a bucket is created. Location Hints are a performance input; Jurisdictional Restrictions are a contractual commitment.
A normal bucket isn't a weaker bucket. Security, durability and pricing are identical. The only difference is whether Europe is a preference or a guarantee.
"We'd like Europe."
Cloudflare aims to place your bucket in Western or Eastern Europe (weur / eeur).
Full Basin family: Basin Catalog, automatic table maintenance, Basin SQL, Pipelines into tables.
Best for: performance, preference, analytics.
"It must stay in Europe."
Your data is stored and processed only in the EU. Set when the bucket is created. It can't be changed later.
Basin Catalog and Basin SQL aren't supported today. Use plain files, or bring your own Iceberg catalog.
Best for: legal, regulatory or contract requirements.
Have both? Use two buckets: an EU jurisdiction bucket for regulated data, and a bucket with a Europe hint for analytics with Basin.
Location hints are best effort and not a residency guarantee. Whether you need a jurisdiction is a decision for your legal or compliance team.
Hint = soft placement preference. Jurisdiction = guaranteed: stored AND processed there; set at creation, cannot change.
wnam Western North Americaenam Eastern North Americaweur Western Europeeeur Eastern Europeapac Asia-Pacificoc Oceania
eu, us, fedramp.
Set once at bucket creation — cannot be changed later.
Use when a law, contract or policy requires data to stay in a region (for example,
EU data sovereignty or FedRAMP).
| Property | Location Hint | Jurisdictional Restriction |
|---|---|---|
| Binding strength | Best-effort | Hard guarantee |
| When to use | Performance tuning | Compliance / data sovereignty |
| Can change later? | Yes | No — set at creation only |
| Works with Basin Catalog? | Yes | Not today |
| Available values | wnam enam weur eeur apac oc | eu · us · fedramp |
weur / eeur location hint instead. Basin Catalog doesn't support jurisdiction buckets today.One question that always comes up: what happens when two nodes write to the same object at the same time — and what does consistency look like across regions?
R2 provides strong consistency for object and bucket operations: read-after-write, metadata updates, deletes, and listing are all strongly consistent. Once a write is acknowledged, every subsequent read — regardless of where the client connects — sees the latest committed version. This is a consistency guarantee, not a replication guarantee: object data lives at the bucket's configured location; reads from other regions are routed there. Location Hints and Jurisdictional Restrictions control placement, not consistency.
Durability, encryption, retention, and access controls — from the object to the bucket.
99.999999999% annual durability.
AES-256 at rest + TLS in transit.
Customer-provided encryption keys.
Block deletes and overwrites.
Expire objects or move Standard → IA.
Audit Logs + Data Access Logs.
Protect your bucket’s custom domain.
API tokens + temporary credentials.
Turn a new object into a trigger. Process it with a Worker, add AI, and save the result right back.
Your storage can react, not just hold data.Scroll the diagram to follow the flow →
Create the Queue and deploy its consumer Worker first. Then add the notification:
npx wrangler r2 bucket notification create <BUCKET_NAME> --event-type object-create --queue <QUEUE> --suffix "pdf"Event notification setup ↗
The same event-driven pattern also lets an agent build the data it's missing.
Your agent does the thinking. Basin collects, organizes and queries the data.
Why are orders down this week?
Several queries run at once. Repeat queries can come from cache.
Not just answers from existing data. Help building the data you need.
Illustrative flow, simulated in your browser. No agent is called, no application is changed, no resources are created. Based on the Connect 2026 session 'Turning data questions into data infra with Cloudflare Basin'. Watch the session ↗
Already on S3 or GCS? R2 has two tools for moving data across — one bulk, one lazy. Pick based on how much disruption you can absorb.
Two tools, two strategies. Super Slurper copies everything upfront. Sippy copies on demand as objects are first requested. Neither tool deletes the source — and both have practical caveats to understand before you start.
Super Slurper if you want to migrate everything and then cut over DNS or application config. Good for known-bounded datasets where you can absorb the source-egress cost during migration.
Sippy if you want gradual, low-disruption migration. Point your app at R2; objects not yet there are pulled on first request. Over time R2 becomes the source of truth — no big-bang cutover needed.
Core object operations work with existing SDKs. Check advanced features before switching an endpoint. This reference covers the S3-compatible API, not the native Workers binding.
| Operation | R2 status | Notes |
|---|---|---|
| PutObject / GetObject / DeleteObject | ✓ Supported | Core CRUD — fully supported |
| Multipart Upload | ✓ Supported | Required for objects > 5 GB |
| Presigned URLs | ✓ Supported | For direct client uploads/downloads |
| ListObjectsV2 | ✓ Supported | Strongly consistent — reflects completed ops |
| Bucket versioning | ✗ Not supported | No S3 bucket versioning |
| Lifecycle rules | ✓ Supported | Expiration + transition to Infrequent Access; IA cannot transition back to Standard via lifecycle |
| Object tagging | ✗ Not supported | Object tagging API is unimplemented |
| Bucket policies | ✗ Not supported | Use API tokens / Cloudflare Access |
| Replication | ✗ Not supported | No S3 bucket replication API |
| SSE-C | ✓ Supported | Customer-provided encryption keys |
| SSE-KMS | ✗ Not supported | AES-256 with Cloudflare-managed keys by default; no S3 KMS integration |
| Conditional writes: If-Match / If-None-Match | ✓ Supported | PutObject; conditional operations also available for Get / Head / Copy |
| Object Lambda / S3 Select | ✗ Not offered | Not part of R2's S3 API; use a Worker for server-side transforms |
| Legacy S3 ACLs | ✗ Not supported | ACL headers unimplemented; use public bucket / custom domain + API tokens |
Need a specific operation? Check the official S3 API matrix ↗
You've seen the options. Now put a price on your usage.
Pay for what you store and the requests you make. The line for data leaving R2? $0.00. Start with the Standard rates, then plug in your usage below to see the full monthly picture.
Unit prices · not a sample monthly total
10 GB-month storage
1M writes / Class A · 10M reads / Class B
Deletes are always free.
Monthly usage · 1 TB = 1,000 GB
Assumes reads, writes and outbound GB use the same IA share as stored data. Before R2 free-tier allowances. Edit more assumptions in “Show details”.
Illustrative list prices. Compute and other services billed separately.
Open the official R2 calculator ↗Class A = writes/lists; Class B = reads. The receipt uses writes and reads as shorthand. The Standard free tier includes 10 GB-month, 1 million Class A operations and 10 million Class B operations each month; it does not apply to IA.
Storage and requests are billed beyond the applicable allowances. Other Cloudflare services have their own pricing.
Calculator price inputs and estimates follow the selected currency; the rate card above stays in USD. USD list prices are converted at the editable rate above; this is not a live exchange rate. Usage stays unchanged.
| Line item | Current | R2 |
|---|---|---|
| Storagestored GB × storage rate | $2,300.00 | $1,500.00 |
| Readsmillions × read rate | $40.00 | $36.00 |
| Writesmillions × write rate | $50.00 | $45.00 |
| IA retrievaloutbound GB × IA % × rate | $0.00 | $0.00 |
| Egressoutbound GB × egress rate | $3,500.00 | $0.00 |
| Monthly total | $5,890.00 | $1,581.00 |
Fixed R2 list pricesStandard: $0.015/GB-month, $4.50/M writes, $0.36/M reads.
IA: $0.010/GB-month, $9.00/M writes, $0.90/M reads, $0.01/GB retrieval.
R2 egress: $0.00.
How the R2 mix worksFor IA share p, storage rate = (1 − p) × Standard + p × IA. The same weighted-rate formula applies to reads and writes. Retrieval = outbound GB × p × IA retrieval rate. IA has a 30-day minimum storage duration.
Conservative, steady-state estimateFull-month storage; no early deletion, lifecycle, multipart, tier rounding or other operation costs modeled. Standard free tier is not subtracted: 10 GB-month, 1M Class A and 10M Class B/month. No free tier on IA. Current provider is modeled as one storage tier; any separate retrieval fees are excluded.
Migration & paybackObjects = stored GB × 1,000 ÷ average object MB (rounded up). Migration = stored GB × current egress rate + objects ÷ 1M × blended R2 Class A rate. One write per object; no unused free-tier credit assumed. Payback = one-time migration ÷ monthly savings; n/a if monthly savings ≤ 0. First-year net = 12 × monthly savings − migration.
Each product has its own meter and its own free allowance. Getting data out of R2 is always free.
Assumes the SQL filter keeps 60% of the data, written as Parquet/Iceberg. Uses Workers Paid allowances: 50 GB/month each for transforms and sinks. Pipelines charges only; R2 storage, catalog and Basin SQL are added on top.