Paste a PEM block and download the same bytes as a binary DER file. Whatever was inside, key or certificate, comes through unchanged.
FluffyShieldProtected workspace
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
Why is the DER file smaller than your PEM?
Because PEM spends four letters on every three bytes, and DER doesn't. A small key comes out about half the size, with nothing lost.
FluffyBench · 4 min read · Reviewed
What the converter does
Check the BEGIN label against what's inside
→Turn every four letters back into three bytes
→Hand you the bytes as a .der file
What it does
Not only keys
Certificates and signing requests go through as well.
PEM files too
A saved .pem file opens with Choose file, as well as pasted text.
Line breaks don't matter
Letters split over many short lines decode to the same bytes.
Limits Pasted text, or a PEM file of up to 16 MiB.
When a program wants DER and you have text
You've got a key or a certificate as a block of text that starts with -----BEGIN, and the program or device you're setting up wants a .der file instead. It's the same thing in another wrapping, and getting from one to the other loses nothing.
PEM is short for Privacy-Enhanced Mail. It dates from the days when email could only carry plain letters, so anything binary had to be spelled out in them to survive the trip. Email attachments still travel that way today, hidden from view.
DER is the binary data itself, the bytes before anyone spelled them out. A text editor can't show it sensibly, which is why the converter hands it to you as a download and doesn't show it in a box.
Where the extra size comes from
The spelling PEM uses is called Base64. It writes every three bytes as four letters, digits or signs. The sample key is 91 bytes, so its PEM needs 124 letters for them, and the BEGIN and END lines and line breaks add another 54 bytes on top.
Each DER file is the bytes of its PEM, without the letters
The sample public key
PEM178 bytes
DER91 bytes
The sample signing request
PEM513 bytes
DER327 bytes
0100200300400500600
Size, bytes
Both are test files from the site's own tests, put through this page's converter. How we checked
The sample signing request goes from 513 bytes to 327, nearer two thirds, because the two label lines count for less in a longer file. However long a file gets, the letters alone keep the PEM a third bigger than the DER.
Checking you've still got the same thing
A DER file isn't something you can read, so the converter reports on it before you save it. The last line of that report, SHA-256, is a fingerprint of the bytes: a long code that changes completely if a single byte does.
Run the downloaded file through FluffyBench Hash checksum with SHA-256 and you get the same code the report showed. Anyone holding the same key as DER gets it too, so comparing the whole code with theirs tells you both files hold the same bytes.
There's one check before the label goes. A DER file has nowhere to say what it is, so the converter makes sure the PEM's label was telling the truth while it still has one. We relabelled a signing request as PUBLIC KEY and got "The PEM label does not match the encoded public object."
Saving the .der file
In the box at the top of this page, FluffyBench's Certificate and public key inspector set to PEM to DER, the download button stays grey until the converter has read your block.
Paste the PEM block into the Public key box, with its BEGIN and END lines.
Check the report under What's inside. Object names what the block holds, and Bytes is the size the file will be.
Press Download DER to save the file as public-object.der.
What it turns away
A private key is refused whatever its label, EC PRIVATE KEY included. The box puts up "That’s a private key" and says: "Private keys aren’t accepted. Paste only a certificate, a signing request or a public key, and keep the private key secret." A private key has no business in a web page, and the converter won't read it.
Two blocks pasted together, such as a certificate and the one that issued it, stop with "This operation accepts one public object. Use Certificate Chain Inspector for a certificate bundle." And a file that's already DER gets "PEM-to-DER needs PEM text or a PEM file, not a DER file."