How to reset my dead iphone 4?

Charging port broke. It's dead.
I want to sell it, but I don't want whoever gets it back up to have access to all my old pictures, emails, texts, (ESPECIALLY PICTURES!) Lol.who knows what i still have on there? And some people are evil, will go out of their way to embarass you instead of just deleting it all so i don't trust it. I did have a passcode lock on it though. So is there anything i can do?

Well, in that case you definitely don't want to sell it to a random person (or anyone that knows you, actually)!

This is where I have to recommend selling it to a certified online company that buys used and broken iPhones. In which case I have used http://www.cashiphone.com and know that they are great through experience. They tell you how to reset your iPhone before they send it, so I'm sure if you send it to them as it is that they'll reset it on their own since they won't need any of what's on it. I really wouldn't recommend a site I don't trust!

This garbage was really not helpful.