Go to your Google Account security settings.
Select 2-Step Verification.
Scroll down to the Backup codes section.
Click Continue and then select Get backup codes.
Save these codes in a secure place. You can Download them as a text file or Print them.
Single Use: You can use each code only once.
New Sets: If you generate a new set of codes, your old ones stop working immediately.
Storage: Keep these codes offline. Do not store them in your email or as a photo on your phone.
Privacy: Never share these codes. Google will never ask for them outside of the official sign-in screen.
If you use your last code, return to the Security tab and click Refresh. This creates 10 fresh Backup Codes for you to use in future emergencies.