# Migrate from Neo4j to Memgraph

Memgraph is fully compatible with Neo4j’s **Cypher query language** and **Bolt
protocol**, making it easy to transition your graph data with minimal effort.  
Depending on your use case, dataset size, and workflow preferences, you can
choose one of the following three migration methods.

## Migrate using CSV files

This method involves **exporting your Neo4j data to CSV** and then **importing
it into Memgraph** using the `LOAD CSV` command.

### When to use
- You prefer a **manual, step-by-step** migration process.  
- You want **full control** over data transformation and indexing.  
- Ideal for **medium to large datasets** when export/import time is acceptable.

### Key features
- Uses Neo4j’s APOC library to export data (`CALL apoc.export.csv.all`).  
- Data imported into Memgraph using `LOAD CSV` in **Memgraph Lab**.  
- Offers **fine-grained control** over node and relationship creation.  

> 💡 [Learn more → Migrate from Neo4j to Memgraph using CSV
files](https://memgraph.com/docs/data-migration/migrate-from-neo4j/using-csv-files)

---

## Migrate using a single Cypher query

This approach uses the **`migrate.neo4j`** procedure from the **MAGE module** to
**stream data directly** from Neo4j into Memgraph — no intermediate files
required.

### When to use
- You want a **fast and automated** migration process.  
- You prefer to **avoid manual export/import** steps.  
- Best for **large or live datasets** with minimal downtime.

### Key features
- Runs a **single Cypher query** to copy nodes and relationships.  
- Supports **automatic property and label mapping**.  
- Can selectively migrate **entire graphs or subsets**.  
- Available out of the box in the `memgraph/memgraph-mage` Docker image.

> 💡 [Learn more → Migrate from Neo4j to Memgraph using a single Cypher
> query](https://memgraph.com/docs/data-migration/migrate-from-neo4j/using-single-cypher-query)

---

## Choose the right method

Each migration approach offers different benefits depending on your **data
size**, **complexity**, and **automation needs**:

| Scenario | Recommended method | Why |
|-----------|--------------------|-----|
| You want a **hands-on process** and control over data structure | **CSV files** | Gives you flexibility to inspect, clean, and transform data during migration. |
| You need a **quick, end-to-end migration** with minimal manual work | **Single Cypher query** | Fastest option for large or production datasets, and doesn’t require temporary files. |
| You’re migrating **select parts** of your graph or testing the process before a full migration | **Single Cypher query** | Supports partial or incremental transfers directly over the Bolt connection. |
| You’re working in a **restricted or offline environment** where direct connection between Neo4j and Memgraph isn’t possible | **CSV files** | Doesn’t require network access — just export and import files manually. |

> 💡 **Tip:** If you’re unsure which to choose, start with the **CSV method**
> for better visibility into your data, then use the **Cypher query method** for
> production migrations once you’re confident in the process.

## Memgraph's office hours

Schedule a 30 min session with one of our engineers to discuss how Memgraph fits
with your architecture. Our engineers are highly experienced in helping
companies of all sizes to integrate and get the most out of Memgraph in their
projects. Talk to us about data modeling, optimizing queries, defining
infrastructure requirements or migrating from your existing graph database. No
nonsense or sales pitch, just tech.

![](https://memgraph.com/docs/pages/getting-started/memgraph-office-hours.svg)

- [Book a call](https://memgraph.com/office-hours)
