Back up any data you want to keep
Sign out of Apple ID and turn off Find My iPad
Open Settings
Tap General
Tap Transfer or Reset iPad
Tap Erase All Content and Settings
Enter your passcode if prompted
Enter your Apple ID password if prompted
Confirm the erase
Wait for the iPad to restart and erase itself
