If you have forgotten the iPad passcode, you can recover the data using the iTunes or iCloud account. But you need to delete all the data on your iPad and restore it from the backup. Before proceeding with the recovery process, make sure you have remembered the login credentials of your iTunes or iCloud account. This method is only applicable only if you have already backed up your iPad data on your Mac computer.
Carry out these steps to recover your iPad without losing any data: