Skip to content
UniKit

Certificate format converter

Certificate format conversion: DER (Base64) to PEM and back, plus PEM normalization (CRLF to LF, stray blank lines and indentation removed, body wrapped at 64 characters). Supports the CERTIFICATE / PUBLIC KEY / PRIVATE KEY / RSA PRIVATE KEY / CERTIFICATE REQUEST labels, and reports the label, DER length and SHA-256 fingerprint for a full PEM block.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Input

Result

Pure local computation; nothing is uploaded.

Enter input to see the result

Output lines: 0 · DER bytes: 0 · PEM blocks: 0

What this tool does

  • Wrap a raw Base64 DER blob from openssl into a standard PEM block.
  • Re-wrap a PEM body at 64 characters after copy-paste mangled the line breaks.
  • Compare SHA-256 fingerprints to check that a PEM and a DER blob are the same certificate.

Example

Input

-----BEGIN CERTIFICATE-----
MIICOzCCAeCgAwIBAgIUAlvVhYfhSIE8R+dZYs0qOfOw0w8wCgYIKoZIzj0EAwIw
RDELMAkGA1UEBhMCQ04xDzANBgNVBAoMBlVuaUtpdDEOMAwGA1UECwwFVG9vbHMx
FDASBgNVBAMMC3VuaWtpdC50ZXN0MB4XDTI2MTAxMjA5MTQ0M1oXDTM2MTAwOTA5
MTQ0M1owRDELMAkGA1UEBhMCQ04xDzANBgNVBAoMBlVuaUtpdDEOMAwGA1UECwwF
VG9vbHMxFDASBgNVBAMMC3VuaWtpdC50ZXN0MFkwEwYHKoZIzj0CAQYIKoZIzj0D
AQcDQgAEpsE7aOuEp19253mWV7cIkT2p03uZOj65MjksfhUgB+K1MapCbVFEnj2x
dxieWCj6fN5YeMNl36RfiitFo5IoRKOBrzCBrDAdBgNVHQ4EFgQUcrTQe5O/IXMP
sDEU2zBTWRNKfKYwHwYDVR0jBBgwFoAUcrTQe5O/IXMPsDEU2zBTWRNKfKYwLQYD
VR0RBCYwJIILdW5pa2l0LnRlc3SCD3d3dy51bmlraXQudGVzdIcEfwAAATAOBgNV
HQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA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+2DU3T0HrGrz+xbUc=
-----END CERTIFICATE-----

PEM bodies follow RFC 7468 (64 characters per line, LF endings); the SHA-256 fingerprint covers the whole DER encoding, uppercase with colons (RFC 5280 §4.2.1.2).

Frequently asked questions

Which PEM labels are supported?

The whitelist is CERTIFICATE, PUBLIC KEY, PRIVATE KEY, RSA PRIVATE KEY and CERTIFICATE REQUEST; other labels raise invalid-label instead of producing a bogus header.

Why does an invalid Base64 body fail?

DER must come from 4-character Base64 groups; illegal characters or a remainder of 1 raise an error rather than returning half a certificate.

How is the fingerprint computed?

SHA-256 over the whole DER encoding, printed as uppercase hex with colons, matching openssl x509 -fingerprint -sha256.

Is my certificate uploaded?

No. Parsing and encoding run locally in pure TypeScript; private keys never leave the browser either.

Keywords:certificatepemderbase64

Related tools