Free tool

Keystore command builder

Pro lets you sign with your own key so you can update the app on Google Play forever. Creating that key is one command with eleven arguments that are easy to get wrong. Fill in the fields; copy the command.

Build the keytool command

Passwords are not typed here — keytool asks for them when it runs. Nothing on this page is sent anywhere.

What the key is for

Android will not install an app that is not signed, and it will not install an update unless it is signed with the same key as the version already on the phone. Google Play adds a layer: you sign an upload key, Play holds the real app-signing key and re-signs for distribution. Either way, the key you create with this command is the identity of your app for its whole life. Lose it and you cannot update the app — only publish a new one with a new package name and start again from zero installs.

On the free tier every build is signed with a key the service manages for you, which is fine for installing and sharing APKs. Pro lets you upload your own keystore, so that the app on Google Play stays updatable by you, from any tool, forever.

The arguments, explained

ArgumentWhat it isAdvice
-keystoreThe file that holds the keyOne keystore can hold several keys, but one per app is easier to back up and reason about.
-aliasThe key's name inside the fileLower-case, no spaces. You will type it into the builder.
-keyalg RSA -keysize 2048The algorithm2048 is what every Android tool expects; 4096 is fine and slightly slower to sign with.
-validityDays the certificate is validGoogle Play requires expiry after October 2033. 30 years (10,950 days) is the convention.
-dnameWho owns the keyOnly CN is required. Nothing here is verified or shown to users; it is what keytool would otherwise ask you interactively.

After you run it

  1. Back it up immediately — the .jks file and the password, in two places that are not the same laptop. A password manager entry with the file attached is ideal.
  2. Never commit it to a repository. Add *.jks to .gitignore before you forget.
  3. Upload it in the builder (Pro → Signing) and build. Every future build of that project is signed with it.
  4. If you enrol in Play App Signing (the default for new apps), this becomes your upload key. Play keeps the app-signing key; if you lose the upload key, Play can issue a new one — a much softer failure than losing the only key.

Frequently asked questions

Where does keytool come from?

It ships with every Java installation (JDK or JRE) and with Android Studio. On macOS and Linux it is on the PATH after installing Java; on Windows it is in the JDK's bin folder, and Android Studio's bundled JDK has one under jbr/bin.

Do I have to enter the password on the command line?

No, and you should not — keytool prompts for it, and this tool deliberately has no password field. A password in your shell history is a password in a plain-text file.

Can I use the same key for several apps?

You can, but a separate key per app limits the damage if one is ever leaked or lost. Keystores are tiny; keeping one per project costs nothing.

What if I already published with the free tier's managed key?

An app on Google Play must keep the key it was published with. If you published a free-tier build and later want your own key, that requires a key upgrade request through Play Console — possible with Play App Signing, but easier to avoid by using your own key from the first Play release.

Is anything I type here sent anywhere?

No. The command is assembled by JavaScript on this page. There is no form, no request and no storage.

Read next

Related tools

Your HTML, installed on a phone today

Upload the file or ZIP, pick a name and an icon, and download a signed Android APK in minutes. Free to start — no Android Studio, no code changes, no card.

Convert HTML to APK — free