Reset iphone 5 without passcode?

How to i reset my iphone 5, it keeps asking me for passcode, whilst i didnt set one?

Bring it to an apple store

You'll need to connect to a laptop using your device's cable and iTunes program.

iTunes will prompt you to put in the password, but will allow you the ability to reset your device. Although the information on the phone will be lost, you can recover this using iTunes (if you've previously backed up your phone) or iCloud (if the device has been synced previously).

Your wireless carrier retail store or nearest Apple store should be able to assist if you are unable to do this on your own.

If your iPhone is locked with passcode, you have to reset your iPhone to bypass the password. But this will erase all your data on iPhone. However, you can recover the data after iPhone factory reset. Read more:
http://www.iphone-data-recovery-software.blogspot.com/2013/06/recover-iphone-data-backup-iphone-files.html