How to export your data from MongoDB Atlas

MongoDB Atlas data can be exported using the MongoDB Database Tools (mongodump for a full binary/BSON backup, mongoexport for per-collection JSON or CSV files) or via MongoDB Compass's GUI import/export feature, all connecting to your cluster through its connection string.

Formats: BSON (mongodump archive/directory), JSON, CSVPlan: Any Atlas tier reachable via a connection string — mongodump, mongoexport, and Compass all connect using --uri / the cluster connection string, no special paid-plan feature is documented as requiredRole: An Atlas database user with read access to the target database(s)/collection(s) and a connection string (network access configured)

✓ Verified against MongoDB Atlas's official documentation, October 2026

Step by step

  1. 1Install the MongoDB Database Tools locally (mongodump and mongoexport ship together) or install MongoDB Compass.
  2. 2Get your Atlas cluster's connection string (used as the --uri value for both tools).
  3. 3For a full database backup/migration, run mongodump with your connection string, e.g. `mongodump --uri="<connection string>"` — this dumps every collection's documents, metadata, options, and index definitions.
  4. 4To get a single portable file instead of a folder, add the --archive option (optionally with --gzip to compress it) when running mongodump.
  5. 5For a single collection in JSON or CSV, run mongoexport with --uri, --db, --collection, and --out, e.g. `mongoexport --uri="<connection string>" --db=reporting --collection=events --out=events.json`.
  6. 6Alternatively, open MongoDB Compass, connect to the cluster, navigate to the target collection, and use its Import/Export feature — Compass supports exporting collection data to JSON or CSV.
  7. 7Repeat mongodump/mongoexport per database or collection as needed; each run targets one database or collection at a time.
  8. 8Store the resulting .bson/.json/.csv files somewhere safe before decommissioning the Atlas cluster.

What the export includes

  • ✓mongodump: collection documents, metadata, and options
  • ✓mongodump: index definitions
  • ✓mongodump: writes that occur during the export, only if run with the --oplog option
  • ✓mongoexport: document data from a single collection as JSON or CSV
  • ✓Compass: collection data as JSON or CSV files

What it doesn't include

  • ✗mongoexport is explicitly not a backup tool and should not be relied on for full, restorable backups
  • ✗Compass is explicitly not a tool for backing up data
  • ✗mongodump cannot be used with collections that use Queryable Encryption or client-side field level encryption (CSFLE)
  • ✗mongoexport and mongodump each operate on one collection/database per run — there is no single-click 'export entire Atlas project' button in these tools

Before you start

  • ⚠mongodump is not for backups in the oplog-less default mode; add --oplog to capture writes made during the dump if you need point-in-time consistency
  • ⚠BSON files from mongodump can only be restored into a MongoDB deployment running the same major version or feature compatibility version as the source
  • ⚠mongoexport writes to stdout if you don't specify --out, so always pass --out explicitly to avoid losing output
  • ⚠For CSV import/export with Compass, the first line must be a comma-separated list of field names, and import auto-generates ObjectIDs if none are specified
  • ⚠If you're archiving old/cold data rather than migrating, MongoDB points to Atlas Online Archive (tiers data to S3) instead of mongodump/mongoexport

Where to take your data

Free and cheaper tools that can take a MongoDB Atlas export. See all MongoDB Atlas alternatives →

MongoDB Community Edition

Restore mongodump BSON output with mongorestore, or load mongoexport JSON/CSV files with mongoimport, into a locally or self-hosted Community Edition deployment — this is the most direct, lossless path since the data model doesn't change.

Supabase is Postgres-based, so you first need to flatten/remodel your exported JSON or CSV documents into relational tables (e.g., with a custom script or ETL tool) before loading them with Supabase's SQL import or the `psql`/COPY command — not a drop-in migration.

Railway PostgreSQL

Same as Supabase: convert mongoexport'd JSON/CSV into relational schema/rows, then import into a Railway Postgres database via `psql` or a COPY/CSV import, since Railway Postgres has no native document model.

Exporting from MongoDB Atlas: common questions

Can I export my entire Atlas cluster in one step?+

Not as a single UI click for all data. You run mongodump once per database (it dumps all collections, metadata, and indexes in that database), repeating for each database on the cluster.

What file formats does MongoDB Atlas export to?+

mongodump produces a binary BSON export (directory or single archive file). mongoexport and Compass produce JSON or CSV, which are plain text but lose some type fidelity.

Do I need to install anything to export my data?+

Yes — either the MongoDB Database Tools (mongodump/mongoexport command-line binaries) or MongoDB Compass, both of which connect to Atlas using your cluster's connection string.

Is mongoexport good enough as a backup before I cancel Atlas?+

No. The documentation states mongoexport is not a tool for backing up deployments, since it doesn't preserve all data types and indexes the way mongodump does.

Can I export just one collection instead of a whole database?+

Yes — both mongodump and mongoexport accept a --collection option to target a single collection, and Compass's import/export works at the collection level.

Will my encrypted fields export correctly?+

mongodump cannot be used at all with collections that use Queryable Encryption or client-side field level encryption (CSFLE), so those collections need a different export approach.

Sources

This guide was written from MongoDB Atlas's own documentation and checked against it in October 2026. If a step has changed, the official page wins.