What this tool does
It makes the keys a developer sets up again and again: random secrets for an .env file, SSH key pairs for servers and Git hosts, and RSA, EC or Ed25519 key pairs in the PEM and JWK formats that TLS tools, JWT libraries and identity providers read. Everything the tool generates has Copy (keys, secrets, fingerprints, the randomart and the install commands), as do the worked examples below; every key file has Download (SSH keys under the names ssh-keygen gives them, such as id_ed25519 and id_ed25519.pub), and each new key pair is read back and test-signed in the page before the "Read back and test-signed" badge appears.
Everything runs in this browser tab. Secrets come from crypto.getRandomValues; key pairs from the browser's Web Crypto (crypto.subtle.generateKey), in a background worker, and the page stays usable while a 4096-bit RSA key is made. The SSH and OpenSSH formats, fingerprints and randomart are built by this page's own script, served from this site, with the browser's SHA-256. The tool itself makes no network requests: what you type stays in this browser tab. If you have allowed analytics cookies, Google Analytics sends its usual page-view, scroll and engagement events; they do not include what you type. Keys are never stored: local storage keeps only settings (the tab, the key types and sizes, the JWK alg and kid choices, the byte length and the Django alphabet box). Reloading the page or closing the tab discards every key you did not copy or download.
Which key do I need?
| You want to | Use |
|---|---|
| Log in to a server, or push to GitHub or GitLab over SSH | SSH keys, Ed25519. ECDSA P-256 or RSA 3072 if an old system has no Ed25519. |
Sign JWTs with RS256 | PEM & JWK, RSA 2048 or larger, alg RS256 |
Sign JWTs with ES256 | PEM & JWK, EC P-256, alg ES256 |
Sign JWTs with HS256 | Secret keys, the JWT HS256 row (32 bytes) |
| Set up a new Laravel app | Secret keys, the APP_KEY row |
| Set up a new Django project | Secret keys, the SECRET_KEY row |
| Make an API key or token | Secret keys, 32 bytes, Base64url (safe in URLs and headers) |
How to read the output
SSH keys
- Public key: one line of three fields separated by spaces: the key type (
ssh-ed25519,ecdsa-sha2-nistp256,ssh-rsa), the key in Base64, and the comment. The Base64 part is the SSH wire encoding of the key (RFC 4253 section 6.6 for RSA, RFC 5656 section 3.1 for ECDSA, RFC 8709 for Ed25519): the type name again, then the key itself. The comment is only a label, and you can change it in the box above without making a new key. - Fingerprint:
SHA256:and the Base64 of the SHA-256 hash of the decoded key, without=padding. This is whatssh-keygen -lprints. The row "ssh-keygen -lon the.pubfile" shows its whole line as it appears in a UTF-8 locale; in the C or POSIX localessh-keygenwrites the bytes of non-ASCII comment characters as octal escapes instead (cafébecomescaf\303\251). The MD5 form, hex bytes separated by colons, is whatssh-keygen -l -E md5prints. - Randomart: a picture of the same SHA-256 hash, drawn the way
ssh-keygen -lvdraws it, so that people can compare keys by eye. A walker starts atSin the middle of a 17 by 9 field and makes four diagonal moves per hash byte, two bits per move (at an edge it slides along the wall); the more often it visits a cell, the denser the character there; it stops atE. - Private key: OpenSSH's own format (
BEGIN OPENSSH PRIVATE KEY, "openssh-key-v1" in OpenSSH's PROTOCOL.key), unencrypted, wrapped at 70 characters per line asssh-keygenwrites it. It holds the public key too, which is whyssh-keygen -ycan print the public line from it.
PEM and JWK
- PKCS #8 (
BEGIN PRIVATE KEY, RFC 5208) and SPKI (BEGIN PUBLIC KEY, RFC 5280 section 4.1.2.7) are the generic containers for every key type here. OpenSSL, Python'scryptographyand Web Crypto, which the tests of this page use, read all of them. The olderBEGIN RSA PRIVATE KEY(PKCS #1) andBEGIN EC PRIVATE KEY(SEC 1) forms hold the same numbers;openssl pkey -in private.pem -traditionalconverts if a library insists on them. - JWK (RFC 7517): the key as JSON, its numbers in Base64url. A public RSA JWK has
nande, an EC onecrv,xandy(RFC 7518 section 6), an Ed25519 onekty"OKP",crvandx(RFC 8037). The private JWK addsd(and for RSAp,q,dp,dq,qi). alganduse: the algorithm you pick is written to both JWKs, withuse"sig" for signing algorithms and "enc" for RSA-OAEP and ECDH-ES. Pick "none" to leave both out. For Ed25519 keys, RFC 9864 (October 2025) deprecates the polymorphicEdDSAidentifier of RFC 8037 and defines the fully specifiedEd25519, which new deployments should prefer. Libraries written before RFC 9864 know onlyEdDSA, so it stays the default here; pickEd25519when your verifier supports it.kid: unless you choose "none", the key ID is the RFC 7638 thumbprint: the SHA-256 of the required public members, in alphabetical order without spaces, in Base64url. Anyone with the public key can compute it again, so it is a stable ID that reveals nothing the public key does not.- Read back and test-signed: on the SSH tab, the OpenSSH file on screen was parsed back to the same numbers and public key, and the PKCS #8 key signed a test message that its public key verified. On the PEM & JWK tab, both PEM texts and both JWKs on screen were imported again with Web Crypto, and test signatures made with the private keys verified with the public keys. The badge goes away whenever the outputs change and comes back only when they pass again.
Worked examples
These are this tool's own outputs for published test keys, so you can check them against the RFCs and ssh-keygen. Everyone can read these private keys: they are examples, never keys to use.
The Ed25519 key of RFC 8032 section 7.1, TEST 1 (secret key 9d61b19d…1cae7f60), comment rfc8032-test1
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINdamAGCsQq31Uv+08lkBzoO4XLz2qYjJa8CGmj3B1Ea rfc8032-test1ssh-keygen -lv -f on the private key file prints:
256 SHA256:bbXpuKG6zhzdmnxq256TlqzFBzRl2f6OOg722cYNbU8 rfc8032-test1 (ED25519)
+--[ED25519 256]--+
| oo |
| o. . |
| o .. |
| o o o. |
| S + o o |
| . + + . E|
| . ..Ooo. B.|
| o o.BBB.o+ +|
| .*+OB=o=+. |
+----[SHA256]-----+The private key file, with the check number fixed at 0x12345678 so that the example is reproducible (the tool draws it at random, as ssh-keygen does):
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
QyNTUxOQAAACDXWpgBgrEKt9VL/tPJZAc6DuFy89qmIyWvAhpo9wdRGgAAAJASNFZ4EjRW
eAAAAAtzc2gtZWQyNTUxOQAAACDXWpgBgrEKt9VL/tPJZAc6DuFy89qmIyWvAhpo9wdRGg
AAAECdYbGd7/1aYLqESvSS7CzEREnFaXsyaRlwO6wDHK5/YNdamAGCsQq31Uv+08lkBzoO
4XLz2qYjJa8CGmj3B1EaAAAADXJmYzgwMzItdGVzdDE=
-----END OPENSSH PRIVATE KEY-----Decoded, it reads: openssh-key-v1 and a zero byte, cipher none, KDF none, empty KDF options, one key, the 51-byte public key, then the private part: the check number twice, the type, the 32-byte public key, the 64-byte private field (the 32-byte secret followed by the public key again), and the comment. That private part is 144 bytes, already a multiple of 8, so no padding follows it; OpenSSH appends the bytes 1, 2, 3 and so on only when the last block of 8 needs filling.
The same key as PEM and JWK, alg EdDSA, kid the thumbprint
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIJ1hsZ3v/VpguoRK9JLsLMREScVpezJpGXA7rAMcrn9g
-----END PRIVATE KEY-----
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo=
-----END PUBLIC KEY-----
{"kty":"OKP","kid":"kPrK_qmxVWaYVA9wwBF6Iuo3vVzz7TxHCTwXBygrS4k","use":"sig","alg":"EdDSA","crv":"Ed25519","x":"11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo"}The x value is the public key of RFC 8037 Appendix A.2, and the kid is exactly the thumbprint RFC 8037 Appendix A.3 gives for it.
The P-256 key of RFC 6979 Appendix A.2.5 as an SSH public key, comment rfc6979-p256
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGD+1LolWp0xyWHrdMY1bWjASbiSO2H6bOZpYi5g8p+2eQP+EAi4vJmkGunpVii8ZPLxsgwtfp9Rd6PClNRGIpk= rfc6979-p256
256 SHA256:hfuNWmjIYvsBGZ6dpCLTTAEa5LxbZABRHHVoynAxFlo rfc6979-p256 (ECDSA)RFC 5656 section 3.1 encodes it as the type, the curve name nistp256, and the point 04 || x || y, 65 bytes, with the RFC's Ux and Uy as x and y.
32 example bytes 00 01 02 … 1f in the formats of the Secret keys tab
| Hex | 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f |
|---|---|
| Base64 | AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8= |
| Base64url | AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8 |
| Laravel | base64:AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8= |
Base64url (RFC 4648 section 5) swaps + and / for - and _; this tool also leaves out the = padding, as JWTs do (RFC 7515 section 2), so the value can sit in a URL or a JWT without escaping. Laravel's key:generate writes base64: followed by standard Base64 of 32 random bytes for the default AES-256-CBC cipher.
Edge cases and pitfalls
- File permissions. OpenSSH refuses a private key that other users can read: with mode 0644,
ssh-keygen -yprints "WARNING: UNPROTECTED PRIVATE KEY FILE!" and ignores the key. Runchmod 600on the downloaded private key; a browser download cannot set this for you. - No passphrase. The private key is written unencrypted, because encrypting it would mean typing the passphrase into this page. Add one locally with
ssh-keygen -p -f ~/.ssh/id_ed25519: it rewrites the file encrypted and keeps the key and its fingerprint. - Where the key was made. A key made in a browser is as safe as that browser and its extensions at that moment. For a key that guards production systems,
ssh-keygenon the machine that will use it is the stronger choice, because the key then never exists anywhere else. This page is for development machines, test servers, CI and learning the formats. - Ed25519 in PKCS #8. OpenSSH 8.7, the version this tool was tested with, refuses an Ed25519 private key in PKCS #8 ("invalid format"), while it reads RSA and ECDSA ones. Give OpenSSH the OpenSSH-format file; use the PKCS #8 file for OpenSSL and libraries.
- RSA and SHA-1. OpenSSH 8.8 turned off RSA signatures with SHA-1 (the
ssh-rsasignature algorithm) by default. RSA keys are not affected: the same key signs with SHA-256 or SHA-512 (RFC 8332) on any server from OpenSSH 7.2 on. The public line still starts withssh-rsa, because that names the key type. - Defaults of
ssh-keygen. Since OpenSSH 9.5ssh-keygenmakes Ed25519 keys by default, and since 8.0 its default RSA size is 3072 bits. That is why the SSH tab's RSA size defaults to 3072. - Django keys in
.envfiles. Django's alphabet includes$,#,&and(. Some.envloaders read#as a comment or expand$NAME, and a shell treats several of these as syntax. Put the value in single quotes, or tick "letters and digits only" (62 characters, 50 of them still carry about 298 bits). The alphabet has no quote or backslash, so the key is safe inside a Python string as it is. - Django's own checks.
manage.py check --deploywarns (security.W009) whenSECRET_KEYhas fewer than 50 characters, fewer than 5 different characters, or starts withdjango-insecure-, the prefixstartprojectputs in front of the key it writes. The keys here have 50 characters and no prefix. - Changing
APP_KEY. Laravel's defaultwebmiddleware encrypts its cookies (EncryptCookies), the session cookie included, andCryptuses the same key. A new key logs everyone out and makes data encrypted with the old key unreadable, so generate it once per environment and keep it in your secret store. To rotate it on Laravel 11 or later, put the old key inAPP_PREVIOUS_KEYS(comma-separated): Laravel then still decrypts values made with it, while new values use the newAPP_KEY. - HMAC secret length. RFC 7518 section 3.2 requires an HS256 key of at least 256 bits, and the hash size for HS384 and HS512: 32, 48 and 64 bytes, the sizes used here. A human-chosen password is not a key: it has far less entropy than its length suggests.
- Base64 or Base64url. A library that expects one and gets the other fails on
+,/,-or_, or decodes different bytes. Check whether your library wants the secret as text (used byte for byte) or as encoded bytes. - The private JWK is a secret. Only the public JWK or the JWK Set belongs in a
jwks.jsonendpoint. A JWK withdin it is the private key.
Standards used
- RFC 4253SSH transport, the
ssh-rsakey format (section 6.6); data types in RFC 4251 section 5 - RFC 5656ECDSA keys in SSH (section 3.1), curve names nistp256, nistp384, nistp521
- RFC 8709Ed25519 keys in SSH (
ssh-ed25519) - RFC 8332RSA keys with SHA-256 and SHA-512 signatures in SSH
- OpenSSH PROTOCOL.keyThe openssh-key-v1 private key format (not an RFC)
- RFC 5208PKCS #8 private keys; SPKI in RFC 5280 section 4.1.2.7; PEM text in RFC 7468
- RFC 8410Ed25519 keys in PKCS #8 and SPKI
- RFC 7517JSON Web Key; key parameters and HMAC key sizes in RFC 7518 (sections 3.2 and 6)
- RFC 8037Ed25519 JWKs (OKP) and EdDSA; examples in Appendix A
- RFC 9864Fully specified JOSE algorithms:
Ed25519, andEdDSAdeprecated (section 2.2 and 4.1.2) - RFC 7638JWK thumbprint, used for
kid - RFC 4648Base64 (section 4), Base64url (section 5), hex (section 8)
- Web Cryptography APIThe browser API that generates the key pairs and the random bytes
The engine is tested against ssh-keygen (OpenSSH 8.7) and OpenSSL 3.2 on every key type and size: ssh-keygen -y reproduces the public line from the private file, ssh-keygen -l, -l -E md5 and -lv print the same fingerprints and randomart, and openssl pkey reads every PEM and derives the same public key. Python's cryptography loads the OpenSSH and PKCS #8 private keys and the SPKI public key, and finds the same numbers in them as in the JWK files; the SSH encoder reproduces the public lines of keys that cryptography generated. The thumbprints match RFC 7638 section 3.1 and RFC 8037 Appendix A.3.
Frequently asked questions
Which SSH key type should I choose?
Ed25519 for anything current: small keys, fast, and the default of ssh-keygen since OpenSSH 9.5. ECDSA P-256 where a device or service lacks Ed25519, and RSA 3072 or 4096 for the oldest systems.
Why is Ed25519 not available in my browser?
The keys come from the browser's Web Crypto, and Ed25519 arrived there later than RSA and ECDSA; some browser versions do not offer it yet. The page tests for it and says so when it is missing. Choose ECDSA P-256 here, or run ssh-keygen -t ed25519 on your machine.
How do I check that the downloaded key is the one shown here?
Run ssh-keygen -l -f ~/.ssh/id_ed25519.pub (or the private file) and compare the SHA256: value with the fingerprint on the page. ssh-keygen -y -f ~/.ssh/id_ed25519 prints the public line again from the private key.
Why does RSA take longer than the others?
An RSA key needs two large random primes, and the browser has to try many random numbers until it finds them, so the time varies from key to key and grows quickly with the size. An Ed25519 or ECDSA key is a random number and one point multiplication, which takes milliseconds. When a key takes longer than a moment, the page shows the time spent and a Cancel button.
Can I sign JWTs with these keys?
Yes. Load the PKCS #8 private key or the private JWK into your JWT library to sign, and give the public PEM or the JWK Set to the service that verifies the tokens.
Does anything I generate here reach your server?
No. The keys are made and formatted in your browser. The tool itself makes no network requests: what you type stays in this browser tab. If you have allowed analytics cookies, Google Analytics sends its usual page-view, scroll and engagement events; they do not include what you type. The page has no share link for keys and never writes to the address bar (a link may name a tab, such as #ssh), and local storage holds only settings: the tab, the key types and sizes, the JWK alg and kid choices, the byte length and the Django alphabet box. Loading the page is counted in the site's usage statistics, as on every tool page, and no key is part of that record.