Skip to main content
supabase-export is the definitive answer to “how do I export all my Supabase data?” — paginated export of every table, with a direct importer into any Postgres target: self-hosted Supabase, Neon, Railway, RDS, or local.

GitHub

nometria/supabase-export

npm

@nometria-ai/supabase-export

Install

# Run without installing
npx @nometria-ai/supabase-export export --url https://your-project.supabase.co --key eyJ...

# Install globally
npm install -g @nometria-ai/supabase-export

# Or as a dev dependency
npm install --save-dev @nometria-ai/supabase-export

Export from Supabase

# Export all tables to ./supabase-export/ as JSON
supabase-export export \
  --url https://your-project.supabase.co \
  --key eyJ...service-role-key...

# Export specific tables only
supabase-export export --url ... --key ... --tables users,posts,comments

# Export as SQL INSERT statements
supabase-export export --url ... --key ... --format sql

# Bundle all tables into a single file
supabase-export export --url ... --key ... --bundle
Use your service role key, not the anon key. The anon key cannot read all tables.

Import into any Postgres

# Import into any Postgres target (Neon, Railway, RDS, self-hosted Supabase, local)
supabase-export import \
  --dir ./supabase-export \
  --target postgresql://user:pass@host:5432/db

# List available export files before importing
supabase-export list-local --dir ./supabase-export

Environment variables

SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=eyJ...        # service role key
TARGET_DATABASE_URL=postgresql://...  # for imports

Use cases

ScenarioCommand
Full data backupsupabase-export export --url ... --key ...
Migrate to self-hosted SupabaseExport + import to new instance
Move to Neon or RailwayExport + --format sql + psql
Local dev seedingExport prod → import to local
Exit Supabase entirelyFull export to any Postgres
This tool is open source and works with any Supabase project, not just Nometria deployments.