If you know the Apple ID and can use it, go to Settings > General > Transfer or Reset iPad > Erase All Content and Settings
If you forgot the passcode, put the iPad into Recovery Mode
Connect the iPad to a Mac or PC with Finder or iTunes
On a Mac with macOS Catalina or later, open Finder
On a Windows PC or Mac with macOS Mojave or earlier, open iTunes
Locate the iPad in Finder or iTunes
Choose Restore when prompted
If Recovery Mode does not work, use DFU mode and restore the iPad through Finder or iTunes
If Activation Lock appears after reset, enter the Apple ID and password previously used on the iPad
If you do not have the Apple ID, contact Apple Support with proof of purchase
