How to factory reset iPhone 5 without restrictions passcode?

I got a new phone and have to factory reset the one I currently have. Except I have 12 failed restrictions passcode attempts and that is needed to reset it. I haven't the slightest idea what it is. Is there any way I could reset it without that passcode?

If the device is on iOS 7 you might be referring to an issue with "activation lock" and that can't be bypassed except on an iPhone 4 using Redsn0w and "hacktivating". If you are not on iOS 7 or the device does not have activation lock set you can simply put the device in "DFU" mode:

1. Plug in to PC
2. ITunes rejects device
3. Download the proper "IPSW" from icj.me
4. Hold down power button for three secs
5. Without letting go of power hold home for ten seconds
6. When PC beeps let go of power and continue to hold home for 15 seconds
7. Open iTunes
8. Hold Shift + Click Restore
9. Select the IPSW that you downloaded
10. Device will restore
11. Problem solved

This works because you restore the phone to factory settings. ITunes typically rejects devices with failed passcode attempts but putting it in DFU fixes this because it starts the restore at the boot loader of the device.