Canonical: https://toolipedia.app/dkim-key-generator

# DKIM Key Generator

Generate a DKIM RSA key pair in your browser and get the DNS TXT record and the private key in PEM format for your mail server.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > DKIM Key Generator

## About DKIM Key Generator

Creates a DKIM RSA key pair in your browser with the Web Crypto API and prepares everything you need. Choose a selector such as default or mail2024, your domain and a key size of 1024, 2048 or 4096 bits. You get the DNS TXT record name (selector._domainkey.example.com), the value starting v=DKIM1; k=rsa; p=, a zone-file line with the value split into 255-character strings, the private key as PKCS#8 or PKCS#1 PEM and the public key. Generation needs a secure page (https), and the private key never leaves the page.

## How to use DKIM Key Generator
1. Type the selector and the domain you send mail from, and choose a key size.
2. Create the TXT record in your DNS with the name and value shown.
3. Give the private key to your mail server or sending service with the same selector, then send a test message.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- dkim key generator
- generate dkim keys online
- dkim dns txt record
- dkim selector record generator
- dkim rsa 2048 key pair

## Frequently asked questions

### What key size should I choose?

2048 bits is the usual choice today. 1024 bits is considered weak and is kept only for DNS hosts that cannot take longer records. 4096 bits needs a record split into several strings and gains little.

### Why is the record split into several strings?

A single DNS TXT string holds at most 255 characters, and a 2048-bit public key is longer than that. The strings are joined by the receiver, so the zone-file line is equivalent to one long value.

### How often should I rotate DKIM keys?

Many guides suggest every six to twelve months. Publish the new selector first, switch your mail server to it, and remove the old record only after mail signed with it has stopped arriving.

### Is DKIM Key Generator free?

Yes. DKIM Key Generator on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with DKIM Key Generator:
- [JWK and PEM Key Converter](https://toolipedia.app/jwk-pem-key-converter)
- [DNS Zone File Generator](https://toolipedia.app/dns-zone-file-generator)
- [Email Header Analyzer](https://toolipedia.app/email-header-analyzer)
- [Certificate and Private Key Match Checker](https://toolipedia.app/certificate-private-key-match-checker)
- [Key Pair Generator](https://toolipedia.app/key-pair-generator)
