How to View SSL Certificate Details on Mac
View certificate details on a Mac with Keychain Access, openssl x509 or s_client, or an offline X.509 certificate decoder for PEM, DER and chains.
GuideUpdated 9 min read
On this page
To view a certificate's details on a Mac, run openssl x509 -in cert.pem -noout -text in Terminal. Add -inform der if the file is binary DER. For a certificate that's already in your keychain, double-click it in Keychain Access. For a live website, openssl s_client fetches the certificate the server sends. If you'd rather read a sorted report than a text dump, an offline X.509 certificate decoder such as the one in Bytepliers reads PEM, DER, whole chains and pasted strings with literal \n in them.
View a certificate in Keychain Access
Keychain Access is built into macOS. It shows full details for any certificate stored in a keychain. Apple doesn't document where the app lives on disk, and reports disagree for recent macOS versions, so open it with Spotlight.
- Press ⌘Space (Command-Space), type Keychain Access and press Return.
- In the sidebar, choose a keychain. login holds certificates you imported. System Roots holds the root certificates macOS trusts.
- Click Certificates at the top of the window.
- Find the certificate and double-click it. The search field in the toolbar filters the list.
- Expand Details to see the subject, issuer, validity dates, extensions and fingerprints.
Keychain Access only shows certificates that are in a keychain. Double-clicking a .cer or .crt file in Finder adds it to a keychain, which you may not want if you only need an expiry date. It also can't read a certificate you copied as text, or fetch one from a server.
Since macOS Sequoia, saved passwords live in the separate Passwords app. As of November 2026, Apple still ships and documents Keychain Access for certificates and keys.
Read a certificate file with openssl x509
Every Mac has an openssl command. On a stock Mac it's Apple's bundled LibreSSL build. Run openssl version to see which build you have. The commands below work with LibreSSL and with OpenSSL installed through Homebrew. None of them change anything on your Mac.
Print every field of a PEM certificate, meaning text that starts with -----BEGIN CERTIFICATE-----:
openssl x509 -in cert.pem -noout -textDo the same for a binary DER file:
openssl x509 -in cert.cer -inform der -noout -textShow only who the certificate is for, who issued it and when it's valid:
openssl x509 -in cert.pem -noout -subject -issuer -datesShow the SHA-256 fingerprint:
openssl x509 -in cert.pem -noout -fingerprint -sha256List the Subject Alternative Names, which are the host names the certificate covers:
openssl x509 -in cert.pem -noout -text | grep -A1 "Subject Alternative Name"Check whether the certificate expires in the next 30 days (2,592,000 seconds). It prints "Certificate will not expire" and exits with status 0 if the certificate is still valid after that:
openssl x509 -in cert.pem -noout -checkend 2592000Decode a PEM certificate you've copied to the clipboard:
pbpaste | openssl x509 -noout -textopenssl x509 reads only the first certificate in a file. To list every certificate in a chain file such as fullchain.pem, run:
openssl crl2pkcs7 -nocrl -certfile fullchain.pem | openssl pkcs7 -print_certs -nooutThis prints the subject and issuer of each certificate in order. Add -text before -noout to get full details for each one.
Check a website's certificate from Terminal
openssl s_client connects to a server and shows the certificate it presents. Use it when you need what clients actually receive, for example when a renewed certificate may never have been loaded by the server.
Show the subject, issuer and validity dates for a site:
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -datesHere is what each part does:
-servernamesends the host name (SNI), so a server that hosts many sites returns the right certificate.</dev/nullcloses the connection straight away instead of waiting for input.2>/dev/nullhides the connection messages.
Replace -subject -issuer -dates with -text to see every field. For other services, change the port, for example :993 for IMAP over TLS.
To copy every certificate the server sends (the leaf plus intermediates) to the clipboard as PEM:
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null 2>/dev/null | awk '/BEGIN CERTIFICATE/,/END CERTIFICATE/' | pbcopyThe full s_client output also includes a Verify return code line. 0 (ok) means the chain verified against the CA bundle your openssl build uses. Any other code names the problem, such as an expired certificate or a missing intermediate.
Decode PEM, DER or pasted text with an X.509 certificate decoder
Bytepliers is our Mac app of small offline developer tools. Its Certificate Decoder turns a certificate into a sorted report, and you don't have to pick the right flags first. It accepts:
- PEM, including whole chains and PEM with literal
\nsequences (common when a certificate is stored inside JSON or an environment variable) - Bare Base64 with no header lines
- Hex DER
.cer,.crt,.pemand.derfiles
To decode a certificate:
- Open Bytepliers and choose Certificate Decoder in the Inspect group of the sidebar. You can also press ⌘K (Command-K) and type "certificate".
- Paste into the PEM / Base64 / DER pane, drop a file on it, or click Open Certificate… (⌘O).
- Read the Details report. If you pasted a chain, use the Certificate picker to switch between certificates.
- Click Copy Report to paste the report into a ticket or a chat message.


There are other ways to get a certificate into Bytepliers.
From Finder: right-click a .pem, .cer, .crt or .der file and choose Open With > Bytepliers. The file opens in Certificate Decoder. Bytepliers never makes itself the default app for any file type, so double-clicking still opens your current default app.
From the Dock: drop the file on the Bytepliers icon.
From the clipboard: in Settings > General, set Clipboard matches: to Suggest Tools. A copied certificate is then recognized as "X.509 certificate" when you switch to Bytepliers. You can also check the clipboard on demand with ⇧⌘K (Shift-Command-K), even with that setting off. Detect & Replace Clipboard replaces a copied certificate with its text summary. It works from any app with the default shortcut ⌥⇧⌘B (Option-Shift-Command-B).
From Terminal: the bytepliers command-line tool has a cert-report transform. Install the tool with Settings > Integrations > Install…. It reads text, so give it PEM or Base64, not a binary DER file. This command fetches a site's certificate, converts it to PEM and prints the Bytepliers summary:
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 | bytepliers cert-reportSee the bytepliers command-line tool docs for setup.
Certificate Decoder only reads certificates you give it. It parses the DER with its own code and sends nothing anywhere. To check a live server, fetch the certificate with s_client first. Bytepliers is part of MacSuite, and you can try it free for 7 days.
Read the report: expiry, SANs, chain, usage and fingerprints
The Details report is grouped like this:
| Section | What it shows | What to look for |
|---|---|---|
| Status badge and validity bar | VALID, EXPIRED or NOT YET VALID, with a day count | Days left before you need to renew |
| Subject / Issuer | Who the certificate is for and who signed it | In a chain, each certificate's Issuer should match the next one's Subject |
| Key & Signature | Public key and its size or curve, signature algorithm, serial number, version | The key size and algorithm a client or policy requires |
| Subject Alternative Names | DNS names, IP addresses, emails, URIs | Every host name you serve. Browsers match the host against this list, not the Common Name |
| Usage | CA flag, key usage, extended key usage, subject and authority key IDs | A server certificate shouldn't be a CA. The authority key ID should match the issuer's subject key ID |
| Endpoints | OCSP, CA issuers, CRL | Where clients check revocation and download the issuer |
| Fingerprints | SHA-256 and SHA-1 | Compare with the fingerprint a provider or pinning config expects |
The report also has a "Security.framework" line, which cross-checks the result with macOS's own certificate framework.
Two problems are easy to spot in the report:
- Name-mismatch errors: the host name is usually missing from Subject Alternative Names.
- Missing or wrong intermediate: one certificate's Issuer doesn't match the next certificate's Subject.
If you need to hash a whole file rather than read a certificate's fingerprint, see how to check a SHA-256 checksum on Mac.
Preview .pem and .cer files with the Space bar
Bytepliers includes a Quick Look extension. Select a .pem, .cer, .crt or .der file in Finder and press Space. You get a summary without opening any app:
- Subject and issuer
- A validity badge with days left or days since expiry
- SANs
- Key and signature
- SHA-256 and SHA-1 fingerprints
For a chain, the certificates are shown stacked.
The preview is read-only and sandboxed, with no network access. Files over 5 MB show only the first 256 KB, with an Open in Bytepliers button. The same extension also previews JSON, YAML and .jwt files. See Quick Look previews for JSON, YAML and certificates.
Which method to use
| Method | Works on | Best for | Can't |
|---|---|---|---|
| Keychain Access | Certificates in a keychain | Checking installed and system certificates | Read pasted text, or a file without importing it |
openssl x509 | Files and stdin | Scripts and quick one-field checks | Read past the first certificate, or PEM with literal \n |
openssl s_client | Live servers | Seeing what a server really sends | Read a file on disk |
| Bytepliers Certificate Decoder | Files, pasted PEM/Base64/hex, chains | A readable report from messy pasted strings | Fetch from a server by itself |
| Bytepliers Quick Look | Certificate files in Finder | Checking expiry without opening an app | Read text you copied |
If your certificate won't decode
openssl says "unable to load certificate". The file is probably DER, so add -inform der. If that also fails, the file may not be a certificate (see the next point).
The file isn't a certificate. Check the first line:
-----BEGIN CERTIFICATE REQUEST-----is a CSR. Read it withopenssl req -in request.csr -noout -text.-----BEGIN PRIVATE KEY-----is a private key. Don't paste it into websites.- A
.p12or.pfxfile is a password-protected bundle. Import it into Keychain Access, or extract its certificates to a new file with this command (it asks for the bundle's password):
openssl pkcs12 -in bundle.p12 -nokeys -out certs.pemOnly one certificate shows up. openssl x509 stops at the first one. Use the crl2pkcs7 command above, or paste the chain into Certificate Decoder and use the Certificate picker.
The string has \n in it. Certificates copied out of JSON or an environment variable often contain the two characters \n instead of line breaks. openssl rejects that, but Certificate Decoder reads it as it is.
s_client hangs or shows the wrong certificate. Add </dev/null so it disconnects. Add -servername with the host name so a shared server returns the right certificate.
Bytepliers says the file "isn't a text file". You dropped a binary DER file on a different tool's editor. Choose Open in Certificate Decoder. The command-line tool rejects binary DER files as "not UTF-8 text", so convert them to PEM first or use the app.
Space doesn't show the Bytepliers summary.
- Make sure Bytepliers is in your Applications folder.
- Open it once.
- Open System Settings, search for "Extensions", and check that Bytepliers is turned on under Quick Look.
- If it still doesn't show, reset Quick Look so it picks up the extension. This doesn't change any settings:
qlmanage -rFAQ
Is it safe to paste a certificate into an online decoder? A server certificate is public: the server sends it to every client that connects. Private keys are what you need to keep off websites. Every method on this page runs on your Mac.
How do I check when a website's certificate expires? Run openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -enddate. It prints the notAfter date.
What's the difference between PEM and DER? DER is the binary encoding of the certificate. PEM is the same bytes in Base64, between BEGIN CERTIFICATE and END CERTIFICATE lines. The .cer and .crt extensions are used for both, so check the file's contents rather than its name.
For every tool in the app, see the Bytepliers tool reference.