I am working on a project where I have to migrate a website from Sharepoint 2010 to sharepoint online. I ran the tool to migrate the site but the source site had a custom webpart which was not migrated by the tool. How can I migrate the custom webpart to sharepoint online?
I suggest you could re-create the custom web part as SharePoint 2013 web part, then import the custom web part into SharePoint online. Otherwise, in SharePoint online, the custom web part cannot work if you export from SharePoint 2010 and import to SharePoint online directly.
Or you could re-create the custom web part for SharePoint online directly.
As mentioned on here sandboxed or form solutions ( aka wsp) solutions are depreciated on SharePoint Online. So we have to create our features in SharePoint Add-In framework.