Deleting emails on iPhone 5S?

So I have thousands of emails on my phone and it's taking up a lot of space, and I wanna delete them all. If I delete them all, does that delete them permanently from my account even on a computer or does it simply delete the copies that are on my phone? I don't want to delete them in case they're permanently deleted because some are important, but I don't want them on my iPhone.

It deletes all of your emails from both but it backs them up you will have to go to the deleted emails and do it again

It will wipe them out everywhere, not just the phone. You need to go into each account on a laptop and clean out what you don't want in the inboxes. Or set up rules in your accounts to auto-move certain emails to saved folders so they don't junk up the inboxes. Also, mod your email settings on the phone to only allow so many (like 150 per account or 30 days for ex.) to feed to the phone. Best luck.