To reset your Nexus 7 to factory settings, please follow these steps:
Note: By performing a factory data reset, all data will be wiped from the device. While any data stored in your Google Account will be restored, all apps and their associated data will be uninstalled.
Go to Settings > Backup & reset.
Touch Factory data reset.
Touch Reset tablet.
If your tablet is password protected, you'll be prompted to enter your Pattern, PIN, or Password.
Touch Erase everything to confirm.
Alternatively, follow these steps:
If your tablet is on, power it off.
Press and hold Power until the device powers on, then immediately press and hold Volume Down (while still pressing Power). You will see the word Start with an arrow drawn around it.
Press Volume Down twice to designate Recovery mode.
Press Power to restart into Recovery mode. You will see an image of an Android robot with a red exclamation mark.
While holding down Power, press Volume Up.
Use the volume keys to scroll to "wipe data/factory reset" and press Power to select it.
Scroll down to "Yes - erase all user data" and press Power to select it.
Note: If at any point during the above steps your tablet becomes unresponsive, you can restart it by holding down the power button for several seconds.