Show a saved Wi-Fi password on Mac

Reveal the password of a network your Mac has joined before.

macOSKeychainWi-FiDiagnosticsMedium risk
Replace the quoted text with the network name (SSID) and run the command. Enter your Mac account password when prompted — the Wi-Fi password is printed on the next line.

01Command

Command
$ security find-generic-password -wa 'SSID'

02What it does

macOS stores Wi-Fi passwords in your login Keychain. The security command reads the AirPort network password item; -w prints the password, -a matches by account (the SSID). Local admin authorization is required, so nobody can read your passwords without your session.

03Risk

RiskMedium risk
RequirementsAdministrator password when prompted
CompatibilitymacOS 10.11 El Capitan – 15 Sequoia
!Warning: This exposes a password on screen. Close the terminal window afterwards; never run it while screen-sharing.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2025-11-17 · Category: Security & Privacy

06Related solutions