How to migrate a SharePoint hosted app from SharePoint 2013 to SharePoint Online?
Do that require the code of app to be rewritten or can we simply download and upload the app file to SharePoint online app catalog?
Normally you don't have to change anything. Just upload and that's it.
However there are a few things to check: