PUB Viewer

.pub file: Publisher document or SSH key?

Two very different files share the .pub extension: Microsoft Publisher publications and SSH public keys. Here's how to tell them apart and open each one.

Free, in your browser – nothing is uploaded

The .pub extension is used by two completely different kinds of file:

How to tell them apart

Open the file with Notepad (right-click › Open with › Notepad). An SSH key is a single line of readable text that starts with ssh-rsa, ssh-ed25519 or ecdsa-sha2. A Publisher file shows unreadable characters.

Opening an SSH public key

There's nothing to convert: it's plain text. Copy it from Notepad when a service (GitHub, a hosting provider, a server) asks for your public key. Never share the file with the same name but without .pub (for example id_ed25519): that one is the private key.

Opening a Publisher file

Use PUB Viewer on Windows. If you open an SSH key with it by mistake, it tells you so instead of showing an error.

PUB ViewerOpen .pub files online for free. The Windows app is coming soon.

More guides