Learn about file storage and database options on Replit.
Using Replit’s flexible storage solutions, you can quickly add the perfect data storage your app needs to run. You can use Replit’s database or object storage for apps with the following requirements:
Replit offers the following data storage options:
Database: stores structured data such as user profiles, game scores, and product catalogs. You can store or retrieve data by attributes and relationships between data points.
Object Storage: stores unstructured data such as images, videos, documents. You can store and retrieve large files and binary data.
Database | Object Storage | |
---|---|---|
Ideal data format | Structured data with relationships | Large files (images, videos, documents) |
Data model | Tables, rows, columns | Buckets, objects |
Query language | SQL | REST API |
Clients | PostgresSQL-compatible clients and ORMs | Replit SDKs and GCS client libraries |
Billing model | Pay for compute time and storage space | Pay for bandwidth and storage space |
Learn more about the following Replit tools to set up and manage your app’s data storage:
Ideal for structured data and representing data relationships. Backed by Neon’s serverless PostgresSQL solution that scales with your app.
Ideal for unstructured data and large files, such as images, videos, and documents. Backed by Google Cloud Storage (GCS) for high availability and scalability.
The quickest way to get started with Replit’s storage solutions is to follow one of the tutorials below:
Connect your app to a SQL database
Manage Object Storage using the Replit Python SDK
Manage Object Storage using the Replit JavaScript SDK
The following examples show how the database and object storage tools can support your Replit Apps.
Store product information, customer profiles, and order history in the database. Use SQL queries to filter products by category, search for items, and manage customer orders.
Share large files such as images, videos, and documents using object storage. Use the Replit Object Storage SDK to upload, download, and move files.