Base64 to PEM
Wrap Base64 DER text in selected PEM armor with 64-character lines.
Your workspace
Processed in your browserThis tool formats raw Base64-encoded DER data into standard PEM (Privacy-Enhanced Mail) blocks. It adds the necessary header and footer lines and ensures the Base64 content is split into 64-character lines, which is the standard requirement for PEM files.
How to format your key
- Paste your Base64-encoded DER string into the input field.
- Select the appropriate block type (PUBLIC KEY or PRIVATE KEY) from the menu to apply the correct armor.
Understanding PEM Armor
PEM files are essentially Base64-encoded DER data wrapped in human-readable headers. This tool automates the process of adding these wrappers. It does not validate the internal structure of the DER data; it simply applies the formatting. Ensure the input is strictly the Base64 representation of your DER-encoded key.
Formatting a Public Key
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA... -----END PUBLIC KEY-----
Questions about this operation
Does this tool validate that my Base64 data is a valid key?
No, it only wraps the provided data. If the input is not a valid DER-encoded key, the resulting PEM file will be syntactically correct but functionally useless.
Why are there 64-character lines?
The PEM standard specifies that the Base64 content must be split into lines of 64 characters to ensure compatibility with older mail systems and standard text editors.
Continue your workflow
Explore more tools in this category for your next step.
PEM to Base64
Remove PEM armor and whitespace to extract its Base64-encoded DER bytes.
PEM Inspector
Inspect a PEM label, decoded byte length, DER root tag and SHA-256 fingerprint locally; encoded private material is not printed in the report.
RSA JWK to PEM
Import an RSA-OAEP JWK and export a PKCS8 or SPKI PEM key.
RSA PEM to JWK
Import RSA PKCS8 private or SPKI public PEM and export a JWK.