Every Mac computer comes with the Keychain Access utility, which keeps track of all of the passwords associated with the computer. If your Mac computer is connected to a Wi-Fi network, the computer's keychain will keep track of the password tied to this network. If you want to locate the Wi-Fi password for your Mac computer, you can do so with the Keychain Access utility in a few simple steps.
Click the "Finder" icon on the computer's dock, followed by the "Applications" folder. Click the "Utilities" folder and double-click the "Keychain Access" icon to launch the utility.
Click the "Passwords" option beneath the "Category" heading. Scroll through the list of saved passwords and double-click the Wi-Fi network whose password you are trying to obtain.
Place a check mark next to the "Show Password" option in the pop-up window that appears. Type your login keychain password when prompted and click the "Allow" button to view the Wi-Fi password. The Wi-Fi password will now be displayed next to the "Show Password" option.