Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a gpg keypair (2048 RSA) in binary file: and a.sec, now I want to convert it to text format, how to do that?

share|improve this question
up vote 3 down vote accepted

For a text/ASCII dump (armored output) of the public key, 'gpg --export -a'.
Read up GnuPG for more.
Also see, Linux Journal GnuPG Hacks.

share|improve this answer

To convert the keys without importing them:

To wrap a file in PGP ASCII armor, type:

$ gpg --enarmor < filename.bin > filename.txt

To unwrap a file already in PGP ASCII armor, type:

$ gpg --dearmor < filename.txt > filename.bin (thanks to @nik)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.