WireGuard preshared key generator
A WireGuard preshared key adds a symmetric layer on top of the normal key exchange, hardening the tunnel against future attacks. Generated locally here.
How to use the wireguard preshared key generator
- Press Generate preshared key.
- Copy the value into both peers' configs under PresharedKey.
- Both ends must use the same key.
What a preshared key does
A WireGuard preshared key is an optional 32-byte symmetric secret added on top of the normal public-key handshake. It hardens the tunnel with defense-in-depth — including resistance against potential future quantum attacks on the key exchange. Put the same value in both peers' configs under PresharedKey. It's generated here with your browser's secure random source and never sent anywhere.
Code & API examples
Use this from the command line or your code.
wg CLI
wg genpsk
See all endpoints at /api/tools/.
Frequently asked questions
It's optional. It adds defense-in-depth — a shared symmetric secret that strengthens the handshake, including against potential future quantum attacks.
In both peers' configs under PresharedKey. Both sides must use the same value.
Want to hide your IP for real?
vpn.golf is a no-logs WireGuard VPN. Pick a hole, take the shot.
Step up to the tee — free