The steps as follows will tell you how to migrate contacts from 1&1 webmail to Office 365.
If you have assigned your 1&1 Mail Basic or 1&1 Mail Business mailboxes to another domain or subdomain as described in the Migrating 1&1 Mail accounts to Office 365 article, you will have to use the correspondingly-modified e-mail address for logging into 1&1 Webmail.
You need log in to your 1&1 WebMail account to export the contacts of yours.
This step is only necessary for importing the file in Outlook later.
Please refer Microsoft Office Help: Importing Contacts into Outlook