Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Web Tools
  3. PEM/DER Converter
Add to favorites

PEM/DER Converter

Convert certificates, keys, CSRs and bundles between PEM and DER. The file type and correct PEM label are detected from the bytes and checked.

Runs locally in your browserMore web toolsJump to full guide

Initializing in your browser…

You might also like

CSR Generator

Generate a certificate signing request and private key in your browser, with SANs and RSA or ECDSA keys, checked before you send it to a CA.

Certificate Decoder

Decode any SSL/TLS certificate in your browser: issuer, dates, host names and extensions in plain words, with host checks and chain verification.

Self-Signed Certificate Generator

Create a self-signed SSL certificate for local development: host names and IPs that browsers accept, key and .p12 downloads, and server settings.

PEM/DER Converter: a worked example

A colleague sends you a 121-byte binary file called server.key and your web server will not load it. A DER file carries no label, so nothing in its name says what is inside.

The first 24 bytes of the file

3077 0201 0104 2088 112f eaf8 c714 90e0 3b5d 1344 aff4 3e4a
What PEM/DER Converter produces

What the converter says, and what it writes

EC PRIVATE KEY   121 DER bytes, read from binary DER

A SEC1 ECPrivateKey: the private scalar, the curve and usually the
public point. Defined in RFC 5915 section 3.

-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIIgRL+r4xxSQ4DtdE0Sv9D5Kc6jv2jxR/+wEV4uhWhp+oAoGCCqGSM49
AwEHoUQDQgAEtEkgueZhIh3rtAYv1i9Wlpu0U8OkOuTICDRgZkUEFOlQJbALiN7C
GmC7H+8YkvV+yTEj2sRN1bqoPb3Tw+pR+w==
-----END EC PRIVATE KEY-----

Checked: the PEM below was read back and the bytes came out 121 bytes identical.

Read it back:  openssl ec -in server.pem -noout -text

The bytes 30 77 open a structure of 119 bytes, 02 01 01 is the version number 1, and 04 20 is a 32-byte private value: the shape of a SEC1 elliptic-curve key, so the label is EC PRIVATE KEY. The label matters because the three private key formats each have their own: PRIVATE KEY for PKCS #8, RSA PRIVATE KEY for PKCS #1 and EC PRIVATE KEY for SEC1. Under the wrong one, OpenSSL and most servers refuse the file with an error that names neither format. The PEM is wrapped at 64 characters, as the standard asks, and reads back to the same 121 bytes.

About the PEM to DER Converter

Convert certificates, signing requests, revocation lists, keys and PKCS #7 bundles between PEM text and DER binary. Drop any file and the converter works out what it holds from the bytes themselves, writes the right PEM label, checks the result reads back identically, and gives you the OpenSSL command to inspect it.

Key features

  • PEM to DER and DER to PEM for certificates, CSRs, CRLs, keys and bundles
  • Type detected from the bytes, with the reasoning shown
  • The right PEM label for PKCS #1, PKCS #8 and SEC1 keys
  • Several objects in one file handled together
  • Round-trip check of every conversion
  • Line width and CRLF options
  • OpenSSL read-back commands for PEM and DER
  • Runs in your browser; keys are never uploaded

How to use

  1. 1Drop a file onto the box, choose one, or paste a PEM block, base64 or hex.
  2. 2Check the detected type and how it was decided.
  3. 3Keep the detected PEM label, or choose another only if you know the bytes better.
  4. 4Set the line width and line endings if a system needs something unusual.
  5. 5Copy or download the PEM or the DER, and use the OpenSSL command to inspect it.

PEM, DER and why the label matters

Two forms of the same data. DER is the binary encoding used for certificates and keys. PEM is the same bytes in base64, wrapped at 64 characters a line between a BEGIN and an END line, so it can travel in e-mail and configuration files. Converting between them never changes the content; it only changes how it is written. Windows tools and Java often want DER (.der, .cer), while web servers usually want PEM (.pem, .crt, .key).

The label is not decoration. The word in the BEGIN line tells every program which parser to use. PRIVATE KEY means PKCS #8, RSA PRIVATE KEY means PKCS #1, and EC PRIVATE KEY means SEC1; write a key under the wrong one and OpenSSL refuses it with an unhelpful error. A DER file has no label at all, so the converter reads the structure of the bytes to decide what they are, explains how it decided, and warns if you choose a label that does not match.

What it accepts. Drop or choose any file, whatever its extension: a .cer can be PEM or DER, and a .key can be either too, so the contents decide. You can also paste PEM blocks, or the base64 or hex of DER. A file with several objects, such as a certificate chain, is shown object by object and converted as a whole.

Checked every time. After converting, the tool reads its own PEM output back and confirms the bytes are identical, so you never ship a file that silently changed. You can choose the line width (64 is the standard; 76 and single-line output are there for systems that expect them) and Windows line endings.

Inspect it with OpenSSL. For the type you are writing, the page shows the exact OpenSSL command that reads the PEM or DER file back, with the right subcommand and flags. Everything runs in your browser, so private keys never leave your device.

Examples

  • A binary key file of unknown type

    Drop it in: the converter reads the structure, names it (for example an EC private key in SEC1 form) and writes the PEM label your server expects.

  • A certificate for Windows or Java

    Paste the PEM certificate and download the DER file (.der or .cer), which certificate import dialogs accept.

  • A chain or bundle from a CA

    Paste a chain file to see each certificate as its own object and convert them in one go, or switch a .p7b bundle between PEM and DER.

Tips & best practices

  • Trust the detected label; most conversion errors come from forcing the wrong one.
  • Keep private keys in PEM with restrictive file permissions, never in shared folders.
  • Use the OpenSSL command shown to confirm a converted file before deploying it.
  • Convert whole chains together so the certificates stay in order.

Frequently asked questions

What is the difference between PEM and DER?

They hold the same data. DER is binary; PEM is that binary in base64 with BEGIN and END lines. PEM is easier to paste into configuration files, DER is what some Windows and Java tools expect.

Why does my server reject a key after conversion?

Usually the label is wrong. A PKCS #1 key must be labelled RSA PRIVATE KEY and a PKCS #8 key PRIVATE KEY. The converter picks the label from the bytes, so keep the detected one.

Is it safe to convert a private key here?

Yes. The conversion happens entirely in your browser and nothing is uploaded. As with any key, avoid copying it onto shared or untrusted machines.

Can it convert a .p12 or .pfx file?

No. PKCS #12 files are password protected containers. Extract the certificate and key with openssl pkcs12 first, then convert those here if needed.

Why 64 characters a line?

The PEM standard, RFC 7468, says so, and almost every reader expects it. The 76 and single-line options exist for the few systems that want them.

What file extension should I use?

Use .pem or .crt for PEM certificates, .der or .cer for DER, .csr for requests, .crl for revocation lists, .key for private keys and .p7b for bundles. The download picks the usual one for the type.

Related tools and how they differ

  • Certificate Decoder: Reads every field of a certificate once it is in PEM form.
  • SSL Certificate Checker: Checks a server's certificate chain for order and missing intermediates.
  • Base64 Encoder/Decoder: Encodes or decodes plain base64, the text layer inside every PEM file.

Private by design

This runs as client-side JavaScript. Keys, tokens, payloads, and other inputs never leave your device.