A 5-minute walkthrough of migrating Gmail emails directly into an Office 365 (Microsoft 365) account using the 4n6 Email Backup tool. Cloud-to-cloud IMAP migration. Gmail labels become Office 365 folders with messages, attachments and metadata preserved. Requires app passwords for Gmail and (if MFA is enabled) for Office 365.
Video Transcript
Hello and welcome to VideoShala. If you are looking to migrate Gmail to Office 365 then watch this full video. By using the 4n6 Email Backup application you can easily transfer your Gmail emails directly into a Microsoft 365 account. This cloud-to-cloud migration preserves your folder structure and email metadata. The tool supports both technical and non-technical users alike.
Step one. Download and install the 4n6 Email Backup application on your system from forensiksoft.com/email-backup.html.
Step two. Add your Gmail source account. Click Open, pick Email Accounts, then select Gmail. Enter your Gmail address and a 16-character Gmail app password generated from myaccount.google.com/apppasswords. You need a Gmail app password because Google retired Less Secure Apps in May 2022 for consumer Gmail and January 2025 for Workspace. Click Add. The tool connects over IMAP and loads your full Gmail mailbox into the left-hand folder tree.
Step three. Click Export and pick Office 365 as the saving option from the dropdown.
Step four. Fill in your Office 365 credentials. Enter the destination email address and password. If MFA is enabled on the destination account you need an Office 365 app password instead of the regular password. Make sure the destination user has a mailbox license assigned in the Microsoft 365 admin center. The tool connects to outlook.office365.com on port 993.
Step five. Click Save to start the migration. The tool downloads each Gmail email and re-uploads it to Office 365 with folder structure preserved. Gmail labels become Office 365 folders. A progress bar tracks messages processed. Speed is roughly 1,500 to 2,500 emails per hour on Indian broadband. When complete, sign into Outlook on the web at outlook.office.com to confirm your Gmail folders appear with all messages, attachments, dates and read or unread status intact. Thanks for watching.
Watch the full video above to see exactly where to click, then follow the written 5 steps underneath.
What you'll see in this video
- Installing and launching the 4n6 Email Converter on Windows
- Adding the Gmail account with an app password
- Previewing folders and selecting which messages to convert
- Choosing Office 365 destination and entering the M365 mailbox credentials
- Browsing to a destination folder and starting the export
Why Migrate Gmail to Office 365
Many businesses and individuals consolidate from Gmail to Microsoft 365 (Office 365) every year. Common reasons: standardising on Microsoft tooling (Outlook, Teams, OneDrive, SharePoint), better integration with on-premises Active Directory, more predictable enterprise pricing, stricter data residency controls, and IT teams who already manage Microsoft infrastructure. Microsoft documents the official Google Workspace to Microsoft 365 migration path in detail, but the official approach requires admin rights and CSV-driven batch migration which is overkill for individual mailbox moves. The 4n6 tool is the simpler approach for one mailbox at a time.
The 4n6 Email Backup tool is a Windows desktop application that connects to Gmail via IMAP, downloads your full mailbox, and uploads it to Office 365 over IMAP. Because it runs on your PC, no third party ever sees your data. You will need a Gmail app password for the source account (since Google retired Less Secure Apps in May 2022 and January 2025) and the Office 365 password (or an Office 365 app password if MFA is enabled) for the destination. The destination Microsoft 365 account must have a mailbox license assigned. If you also want a local backup before migration, see our Gmail to computer backup guide for PST/MBOX exports.
System Requirements
| Requirement | Value |
|---|---|
| Operating system | Windows 11, 10, 8.1, 8, 7 (32-bit or 64-bit). Also runs on Windows Server 2019, 2016, 2012 R2. |
| macOS support | Not available. Windows only. Mac users can run it via Parallels or Boot Camp. |
| RAM recommended | 4 GB minimum, 8 GB+ for mailboxes above 20 GB. |
| Disk space | Install takes under 100 MB. Cloud-to-cloud migration does not save local copies, so disk space is minimal. Optional: tick the local backup checkbox to also save a PST/MBOX copy during migration (matches mailbox size). |
| Gmail source account | Gmail or Google Workspace account. 2-Step Verification enabled. App password generated from myaccount.google.com/apppasswords. Regular passwords are rejected since Google retired Less Secure Apps in 2022/2025. |
| Office 365 destination account | Microsoft 365 account with an Exchange Online mailbox license assigned (Business Basic, Standard, or Enterprise plans all qualify). If MFA is enabled, an app password is also required (generated under Account > Security info > App passwords). |
| Network | Stable internet connection with at least 5 Mbps upload speed. IMAP uses port 993 (SSL). Firewall must allow outbound to imap.gmail.com AND outlook.office365.com. |
| Demo limit | Free demo migrates 10 emails per folder. Full licence removes the cap. |
5 Steps to Migrate Gmail to Office 365
Follow along with the video above as you work through these steps. As shown in the clip, watch where the source-loading step and the destination dropdown sit inside the 4n6 Email Converter interface.
-
Install and launch the 4n6 Email Backup tool. Download the installer from forensiksoft.com/email-backup.html and run it on your Windows PC. The trial version migrates 10 messages per folder so you can verify the full Gmail-to-O365 workflow before licensing. The main interface shows Open, Export and Help tabs.
-
Add your Gmail source account. Click Open, then Email Accounts, then pick Gmail. Enter the source Gmail address. For the password field, paste a 16-character Gmail app password generated from myaccount.google.com/apppasswords. Click Add. The tool connects to imap.gmail.com:993 over SSL and loads your full Gmail mailbox including Inbox, Sent, Drafts, and every label you have created. Watch in the video above where the Gmail source is loaded, the tool auto-detects desktop profiles where possible.
-
Click Export and pick Office 365 as the saving option. From the Save As dropdown, pick Office 365 (or Microsoft 365 in newer versions of the tool, same option). The interface switches to a destination credentials panel. Optionally tick which Gmail labels to migrate and apply filters: Date Range, From Sender, To Recipient, Subject Contains.
-
Fill in Office 365 credentials. Enter the destination Office 365 email address. For the password field: if the destination account does NOT have MFA enabled, use the regular Office 365 password. If MFA IS enabled (typical for Business/Enterprise tenants), generate an Office 365 app password from account.microsoft.com > Security info > App passwords and paste that instead. Critical: the destination user must have an Exchange Online mailbox license assigned in the Microsoft 365 admin center, otherwise IMAP upload fails.
-
Click Save to start the migration. The tool downloads each Gmail email and re-uploads it to Office 365 using IMAP APPEND. Gmail labels become Office 365 folders with the same names. A progress bar shows messages processed. Speed is roughly 1,500-2,500 emails per hour on a 50 Mbps connection. Office 365 throttles to about 50 MB per minute per mailbox. When complete, sign into outlook.office.com with the destination credentials to verify your Gmail folders appear with all messages, attachments and dates intact. As shown in the video, the destination dropdown is where you pick Office 365 before clicking Save to start.
Common Errors and Fixes
| Error or symptom | Cause and fix |
|---|---|
| Gmail rejects login: "Invalid credentials" | You pasted your regular Gmail password instead of an app password. Google retired Less Secure Apps in May 2022 (consumer Gmail) and January 2025 (Workspace), so IMAP rejects the standard password. Generate a 16-character app password from myaccount.google.com/apppasswords (requires 2-Step Verification on the account first) and paste it without spaces. |
| Office 365 rejects login: "Authentication failed" | Three possible causes: (1) the destination user has no Exchange Online mailbox license, (2) MFA is enabled and you used the regular password instead of an app password, or (3) the Microsoft 365 admin disabled basic authentication tenant-wide. For (1), assign a license in the Microsoft 365 admin center. For (2), generate an app password under account.microsoft.com > Security info. For (3), ask the admin to enable Modern Authentication or use the OAuth login path. |
| "Mailbox not found" on Office 365 destination | The destination user account exists in Microsoft 365 admin center but has no mailbox provisioned. This happens when the user has a non-Exchange license (Apps-only plan) or no license at all. Assign a mailbox-bearing license (Business Basic, Business Standard, or any Enterprise plan) and wait 5-10 minutes for the mailbox to provision. Verify by signing into outlook.office.com with the destination credentials. |
| "Cannot connect to imap.gmail.com or outlook.office365.com" | Firewall or antivirus is blocking outbound port 993 (IMAPS). Add an exception for the 4n6 tool in Windows Defender Firewall. Both endpoints must be reachable on port 993. On corporate networks, ask IT to whitelist *.gmail.com AND outlook.office365.com. |
| Migration speed drops mid-run, stays slow | Office 365 throttles IMAP uploads to about 50 MB per minute per mailbox to prevent abuse. The tool will pace automatically. If speed drops below 500 emails per hour, pause for 30 minutes and resume; the throttle resets in that timeframe. Office 365 throttling is more aggressive than Gmail's, which is why migrations are slower than Gmail-only backups. |
| "Connection timed out" during migration | Either Gmail or Office 365 dropped the IMAP connection. Both providers have per-session time limits. The software auto-resumes; if it does not, restart and enable "Split large folders" so each label runs as a separate IMAP session. For mailboxes over 10 GB, splitting reduces single-session size and avoids both timeouts and rate limits. |
| Migration stops at 10 emails per folder | You are on the demo version. The 10-message-per-folder cap is enforced and partial migrations DO land in Office 365. Buy the licence to remove the cap. If you re-run with the licence, you may want to delete the partial Office 365 folders first to avoid duplicates. |
| Some folders missing on Office 365 side after migration | Office 365 reserves certain folder names (Inbox, Sent Items, Drafts, Deleted Items, Junk Email). The 4n6 tool maps these correctly in most cases, but very old custom Gmail labels with special characters (slashes, colons, leading dots) get sanitised or skipped. Check the migration log file in the tool's output folder for any "skipped folder" warnings. |
| Duplicates in Office 365 after re-running migration | The 4n6 tool does not de-duplicate against existing Office 365 messages because IMAP APPEND has no de-dup. Each run creates another copy. To clean up: in Outlook, use the "Clean Up Folder" option (right-click folder > Clean Up > Clean Up Folder) which removes redundant message threads, or sort by date and delete the older copies manually. |
Gmail to Office 365 Migration Tools Compared
Migrating Gmail to Office 365 has several options ranging from free to enterprise. Here are the serious choices.
| Tool | Strengths and trade-offs |
|---|---|
| 4n6 Email Backup (this video) | 10-emails-per-folder trial, paid licence after. Windows only. Cloud-to-cloud IMAP migration with both source and destination credentials in one tool. Folder structure preserved. Best for individual users or small teams without admin rights to Microsoft 365. |
| Microsoft's Google Workspace migration tool | Free, official Microsoft tool. Built into the Exchange Admin Center. Supports up to 50,000 mailboxes per batch using a CSV file. Requires Microsoft 365 global admin rights. Best choice for company-wide migrations from Workspace tenant. Overkill for one-mailbox moves. |
| Microsoft IMAP Cutover migration | Free, official, in Exchange Admin Center. Supports any IMAP source including consumer Gmail (not just Workspace). Requires admin to set up a migration endpoint and CSV file. Up to 50,000 mailboxes. Limitation: does not preserve Gmail labels-to-folders mapping; flattens to a single folder structure. |
| BitTitan MigrationWiz | Enterprise SaaS, paid per-mailbox. Cloud-to-cloud only, no software install. Strong for large-scale (1,000+ mailbox) migrations with detailed reporting and rollback. Significantly more expensive than 4n6 but includes white-glove support. |
| SkyKick Migration Suite | Channel partner tool used by Microsoft resellers. Per-mailbox SaaS pricing. Includes calendar and contact migration. Common choice when an MSP is doing the migration on your behalf. |
| Manual: Outlook IMAP plus drag-and-drop | Free if you already own Outlook. Add Gmail and Office 365 to Outlook as separate IMAP accounts (each with their app password). Drag emails from Gmail folders to Office 365 folders. Slow but works for under 1,000 messages. Loses message read state on the way. |
Performance Notes from Real Testing
Tested on a Dell Latitude 5420 (Intel i5-1145G7, 16 GB RAM, NVMe SSD) over a 50-100 Mbps Indian broadband connection. Cloud-to-cloud migration is bandwidth-bound and rate-limited by both Gmail and Office 365, not CPU-bound. Office 365's 50 MB/minute upload throttle is the typical bottleneck for mailboxes with large attachments.
| Mailbox profile | Migration result |
|---|---|
| Small Gmail account, 220 MB, 1,200 messages | Migration in 50 minutes. All 1,200 messages landed in Office 365 with original folder structure. Zero failed messages. |
| Medium account, 2.4 GB, 18,000 messages | Migration in 8-9 hours running overnight. ~2,100 messages per hour throughput. Office 365 throttled twice around the 5-hour mark, tool auto-paused 30 min and resumed each time. Final folder structure on Office 365 matched Gmail labels exactly. |
| Large account, 8 GB, 50,000 messages with attachments | Migration ran 26 hours total over 2 days. PST equivalent would have been 8.6 GB. Office 365 throttling was the main bottleneck (we hit the 50 MB/min cap on attachment-heavy days). 156 messages skipped due to malformed Gmail headers; we re-ran those individually. |
| Very large account, 22 GB, 130,000 messages | Migration ran 5 days, 8 hours per day. Recommended approach: split by year using Date Range filter. Each year-slice ran overnight without rate limit issues. |
| Workspace tenant with custom domain | If the source domain matches your Microsoft 365 vanity domain (example.com on both ends), DO NOT cut over the MX records until ALL mailboxes are migrated. Mid-migration MX cutover causes mail to bounce between providers. Microsoft documents the safe DNS cutover sequence in the official guide. |
Security and Data Privacy
The migration runs entirely on your PC. Your Gmail and Office 365 credentials go from the 4n6 tool directly to each provider's IMAP server over SSL-encrypted connections (port 993). No third party sees your email. The two app passwords you generated are secondary credentials that grant only IMAP access; even if the 4n6 tool were compromised, your main Gmail and Microsoft passwords remain safe and your other Google and Microsoft services (Drive, OneDrive, Photos, Teams) are protected. You can revoke either app password at any time from Google App Passwords or Microsoft Account Security without changing the main passwords. The migration uploads emails directly between Gmail and Office 365 in real time; nothing is saved on your local disk unless you tick the optional "save local backup copy" option. After migration, both your Gmail and Office 365 accounts hold the same emails. Gmail emails are NOT deleted from Gmail; you must delete them manually if you want a one-way move rather than a copy.
đź’ˇ Pro tips
- Verify the destination Office 365 mailbox license is assigned and the mailbox is provisioned BEFORE starting. Sign into outlook.office.com with the destination credentials; if you see an empty inbox, the mailbox is ready.
- Generate the Gmail app password from myaccount.google.com/apppasswords. If MFA is enabled on the Office 365 destination (typical for Business and Enterprise tenants), also generate an app password from account.microsoft.com > Security info > App passwords. See the Gmail app password guide and the Outlook app password guide for screenshots.
- Run the migration overnight for mailboxes above 2 GB. Office 365 rate-limits to ~50 MB/minute, so a 5 GB mailbox needs at least 2 hours of continuous transfer.
- For large mailboxes (10 GB+), use the Date Range filter to migrate one year at a time. This makes failures recoverable and avoids hitting Office 365 single-session upload limits.
- Skip the Spam and Trash Gmail labels. They rarely contain wanted email and just consume Office 365 storage quota.
- Run a local Gmail backup BEFORE the migration as insurance. Our Gmail backup guide covers PST/MBOX export. If anything goes wrong on the Office 365 side, you have a third-party-independent copy.
- After migration, do NOT immediately delete the Gmail account. Keep it active for at least 30 days while you verify all mail landed correctly in Office 365.
- If you are doing a domain-wide migration (replacing example.com Gmail with example.com Office 365), keep Microsoft's official guide open in another tab. The MX-record cutover step requires careful sequencing and must happen AFTER all mailboxes are migrated.
Frequently Asked Questions
Do I need app passwords for both Gmail and Office 365?
Gmail: yes, always. Google retired Less Secure Apps in May 2022 (consumer Gmail) and January 2025 (Workspace), so you need a 16-character app password from myaccount.google.com/apppasswords. Office 365: only if MFA is enabled on the destination account. If MFA is on, generate an Office 365 app password under Account > Security info > App passwords. If MFA is off, the regular Office 365 password works directly. M365 Business and Enterprise tenants typically require MFA, so app passwords are usually needed there too. See our Gmail app password guide and Outlook app password guide.
Will my Gmail labels be preserved as Office 365 folders?
Yes. Each Gmail label becomes a folder in Office 365 with the same name. Nested labels (Work/Clients/Acme) become nested folders. Inbox, Sent, Drafts, Trash and Spam are mapped to their Office 365 equivalents (Inbox, Sent Items, Drafts, Deleted Items, Junk Email). Note: an email tagged with multiple Gmail labels will appear in multiple Office 365 folders, since Office 365 uses folders not labels. This matches Gmail's data model and is the expected behaviour.
How long does Gmail to Office 365 migration take?
Cloud-to-cloud IMAP migration is bandwidth-bound and rate-limited by both providers. On a 50 Mbps Indian broadband connection, expect roughly 1,500-2,500 emails per hour. A 5,000-email mailbox typically takes 3-4 hours. A 25,000-email mailbox can take 12-15 hours. Office 365 throttles IMAP uploads to about 50 MB per minute per mailbox, which limits speed for large attachments. Run overnight for mailboxes above 2 GB.
Does the destination Office 365 mailbox need a license?
Yes. The Office 365 destination user must have an Exchange Online mailbox license assigned in the Microsoft 365 admin center BEFORE migration starts. Without a license, the IMAP upload will fail with "Mailbox not found" or "No mailbox associated with this account". Verify by signing into outlook.office.com with the destination credentials; if you can see an inbox, the mailbox is provisioned. Microsoft 365 Business Basic and above include Exchange Online.
How does this compare to Microsoft's official Cutover IMAP migration?
Microsoft's official IMAP migration tool (in Exchange Admin Center) is free and supports up to 50,000 mailboxes per migration batch using a CSV file. It is the right choice for company-wide migrations with admin access. The 4n6 tool is for individual users or small teams who do not have Microsoft 365 admin rights or who want a simpler one-mailbox-at-a-time workflow. The 4n6 tool also preserves Gmail labels-to-folders mapping, while the official Microsoft tool flattens label structure.
Will I receive duplicates if the migration is interrupted?
If interrupted mid-run, the tool resumes from where it stopped and does not duplicate. If you re-run a complete migration twice (for example to fix an issue), you WILL get duplicates because IMAP APPEND has no de-duplication. To clear duplicates, search Outlook for the affected folder and delete by date range, or use Outlook's "Clean Up Folder" feature which removes redundant message threads.