First of all, you need a file explorer that gives you the read access to the root folder. If your default File manager doesn’t give you the read access to the root folder, then you can install Root Explorer or Super Manager which will grant superuser permission to you to access the system folder
Go to data/misc/wifi folder, and you will find a file named wpa_supplicant.conf.
Open the file and make sure to open the file in built-in text/HTMLviewer for the task. Now in this file, you will be able to see the network SSID and their passwords next to it.
Now note down the network name and its password. In this way, you will be able to view all saved WiFi password on the Android device.
Note: Please do not edit anything in wpa_supplicant.conf as it can alter your device working or it will have the effect on your WiFi connectivity.
ES File Explorer:
Download and Install ES File Explorer App on your Android device and open the app.
Now you need to enable the “Root Explorer” option in ES File Explorer.
Now you need to move to the Root folder in ES File Explorer, and you need to find a directory called “Data.”
Now under the “Data” you need to locate the folder “Misc”
Now under the WiFi folder, you need to locate the file with name wpa_supplicant.conf. Simply open the file with ES File Explorer’s built-in text/HTML viewer.
Now you can see all your SSID (network name) along with PSK (Password) next to it and close the file.