When you set up an iOS device running iOS 9 or iOS 10, you are prompted for a six-digit passcode. However, you can set a four-digit passcode. This post will show you how to change a passcode from 6 to 4 digits on iPhone/iPad.
Step 1: Go to Settings > Touch ID & Passcode.
Step 2: Enter Passcode that you have set.

Step 3: Then tap on Change Passcode.
Step 4: Enter your old passcode again.

Step 5: Tap Passcode Options, then choose 4-Digit Numeric Code.

Step 6: Enter your new passcode twice to verify it.

Tips: You can use the same procedure to change a custom length numeric passcode, or use a mix of letters and numbers in password, learn more see how to set a stronger Alphanumeric passcode.