Let users upload CSV to your Supabase database
Supabase's dashboard CSV import is for admins, not your users. Here's how to add an embeddable CSV importer that your customers can actually use.

You built your app on Supabase. Now your users need to upload CSV data to their accounts. There's a problem: Supabase's built-in CSV import is admin-only. Your users can't access the dashboard.
This post explains the difference between admin imports and user-facing imports, and shows you how to add an embeddable CSV importer that works inside your app.
Admin import vs user-facing import
Supabase's dashboard CSV import is designed for developers doing one-time data migrations. It's not designed for your customers to use regularly.
Here's the key distinction:
| Scenario | Supabase Dashboard | User-facing importer |
|---|---|---|
| Who uses it | Developers/admins | Your end users |
| Access method | Dashboard login | Embedded in your app |
| Use case | One-time migrations | Ongoing user uploads |
| Column mapping | Headers must match exactly | Visual drag-and-drop |
| Validation | None (errors hit your database) | Before data is inserted |
| Error handling | Silent failures | User-friendly messages |
As the CSVBox blog puts it:
"Supabase doesn't yet provide an end-user upload interface for importing Excel or CSV files into tables. So when a customer sends Excel files full of product SKUs or sales records, you'll need a reliable import workflow."
The limitations you'll hit with dashboard import
100MB file size limit
Supabase's official documentation states: "For very large datasets, this method may not be the most efficient choice, given the size limit is 100MB."
Even below that limit, things break. In one GitHub discussion, a user attempted to upload a 4MB CSV (50,000 rows) via Edge Function and hit "CPU Time exceeded" errors. The workaround? You can't use the PostgreSQL COPY command because, as Supabase support explained: "You are not Superuser with hosted Supabase. You don't have the ability to do Copy."
No column mapping for users
Your users' CSV files won't have headers that match your database columns exactly. Without a column mapping interface, they'll get cryptic errors or worse, data in the wrong columns.
From a Retool forum post describing this exact problem: "I am currently working on a mass import page, where the user is supposed to browse a csv file and it will send the data to the wanted tables in the database."
The user needs to map "Customer Name" to your customer_name column. Supabase's dashboard doesn't provide this.
No validation before insert
When CSV data goes directly into Supabase without validation:
- Case-sensitive column names cause silent failures
- Invalid email formats corrupt your data
- Missing required fields break your app
- Date formats vary by region and fail unpredictably
From GitHub discussion #5953: CSV uploads fail silently with unhelpful errors. Column name case sensitivity issues cause failures.
Building custom is complex
If you try to build this yourself, here's what you're signing up for:
- Convert Excel to CSV/JSON (Supabase doesn't support .xlsx natively)
- Use a library like SheetJS to read files
- Handle authentication carefully (Service Role Key should never be exposed on frontend)
- Split files into smaller chunks (500-1000 rows) to avoid timeouts
- Implement batch inserts with retry logic
- Build error handling for rate limits
That's a lot of code for "let users upload a spreadsheet."
The solution: ImportCSV + Supabase
ImportCSV is an embeddable React component designed for exactly this use case: letting your users upload CSV data to your database.
| Feature | Supabase Dashboard | ImportCSV |
|---|---|---|
| File size limit | 100MB | 10,000+ rows (chunked) |
| Column mapping | No (headers must match) | Yes (AI-assisted matching) |
| Data validation | No | Yes (Zod schema rules) |
| End-user facing | No (admin only) | Yes (embeddable component) |
| Excel support | No (.csv only) | Yes (.csv, .xls, .xlsx) |
| Large file handling | Times out | Virtual scrolling |
How to add user CSV upload to your Supabase app
Step 1: Install the package
npm install @importcsv/react zodStep 2: Define your data structure
Create a validation structure that matches your Supabase table:
import { z } from 'zod';
const contactSchema = z.object({
name: z.string().min(1, "Name is required"),
email: z.string().email("Invalid email format"),
company: z.string().optional(),
phone: z.string().optional()
});Step 3: Add the importer to your app
import { CSVImporter } from '@importcsv/react';
import { createClient } from '@supabase/supabase-js';
import { z } from 'zod';
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY
);
const contactSchema = z.object({
name: z.string().min(1),
email: z.string().email(),
company: z.string().optional(),
phone: z.string().optional()
});
export function ContactImporter() {
const handleComplete = async (data) => {
const { error } = await supabase
.from('contacts')
.insert(data.validRows);
if (error) {
console.error('Insert failed:', error);
} else {
console.log(`Imported ${data.validRows.length} contacts`);
}
};
return (
<CSVImporter
schema={contactSchema}
onComplete={handleComplete}
/>
);
}This gives your users:
- A drag-and-drop file upload
- Visual column mapping (they match "Customer Name" to your
namecolumn) - Validation errors shown before import (not after data is corrupted)
- Support for CSV, XLS, and XLSX files
When each approach makes sense
Use Supabase dashboard import when:
- You're a developer doing a one-time data migration
- You have admin access and your file is under 100MB
- Headers already match your column names exactly
- You can verify the data yourself before importing
Use an embeddable importer when:
- Your end users need to upload their own data
- Users have varying CSV formats and column names
- You need validation before data hits your database
- You want Excel support without custom code
- File sizes may exceed Supabase's limits
Get started
If your users need to upload CSV data to Supabase, ImportCSV handles what the dashboard can't: column mapping, validation, and a user-friendly interface they can actually use.
Try ImportCSV free - no credit card required.
Related posts
Wrap-up
CSV imports shouldn't slow you down. ImportCSV aims to expand into your workflow — whether you're building data import flows, handling customer uploads, or processing large datasets.
If that sounds like the kind of tooling you want to use, try ImportCSV .