The best way of course, comes to 4uKey- iOS password manager, which is able to recover Wi-Fi password stored on iPhone.
1. Connect iPhone to Computer/Mac and unlock the screen
2. Click "Start Scan" button to find the Wifi password
3. Preview and Export Wifi Password