Free tool

APK Version Code Generator

Pick a scheme, type your version name, and get a versionCode that always increases — plus the Gradle block to paste into build.gradle.kts.

What users see: major.minor.patch.

Two version numbers, two entirely different jobs

Every Android app carries both a versionName and a versionCode, and mixing them up is one of the most common reasons a Play Console upload gets rejected.

The rule that follows: every upload must have a higher versionCode than the last one you uploaded. Not different — higher. Play remembers every code you have ever used, and refuses anything less than or equal to your highest, even if you deleted that release.

Which scheme should you use?

SchemeExampleGood forWatch out for
Semantic1.4.210402Reading the version name straight off the codeMinor and patch cap at 99
Date260902Apps that ship on a scheduleOnly one release per day
Date + build26090201CI pipelines with several builds a dayOverflows the ceiling in 2042
Increment13Almost everyone, honestlyCarries no information at all

If you are unsure, use the simple increment. The version code is not documentation — it is a counter, and its only job is to go up. The semantic scheme is worth it when you want to look at a crash report and know instantly which release it came from.

The ceiling, and why it matters

Google Play refuses any versionCode above 2,100,000,000. That sounds impossibly far away until you invent a scheme like yyyyMMddHH, which produced 2026090214 on the day this page was written — already over the limit. Any scheme that packs a four-digit year plus more than four more digits will break. The tool above flags it when your inputs cross the line.

The mistake that costs a release

Uploading with a version code you have already used gives you "Version code N has already been used. Try another version code." — and since Play never forgets a code, the only way out is upwards. Two habits prevent it:

  1. Bump the code in the same commit as the change, not at upload time. A code you set from memory at 11pm is a code you will collide with.
  2. If you publish to multiple tracks or use APK splits, leave gaps. A common pattern is to multiply your logical code by 10 so per-ABI splits can occupy the units digit.

What happens to users when the code goes up

Android compares the installed code with the incoming one. Higher means update — app data, databases and preferences are preserved, and the signing key must match. Lower or equal means the install is refused outright, which is why sideloading an older APK over a newer one fails with a confusing parse or downgrade error. Uninstalling first works but wipes the app's data.

If you build through our online converter, the version name and code are fields on the package step — the same two values, doing the same two jobs.

Frequently asked questions

What is the difference between versionCode and versionName?

versionCode is an integer Android uses to decide which build is newer; users never see it. versionName is the human-readable string shown on your store listing, and Android does no comparison on it at all. You can ship version name 2.0 with version code 47 — they are unrelated by design.

Does versionCode have to increase every time?

Yes, for every upload to Google Play. Play stores every code you have ever used and rejects anything at or below your highest, even for a release you deleted. Locally you can install any APK you like as long as its code is not lower than the installed one.

What is the maximum Android versionCode?

2,100,000,000 — just under the signed 32-bit integer limit. Schemes built from a full four-digit year plus time components blow past it easily, which is why the date schemes here use a two-digit year.

Can I reuse a version code after deleting a release?

No. Google Play keeps the history of used codes for the lifetime of the listing. Once a code is uploaded it is spent, whether or not that release is still published.

What version code should a first release use?

1 is fine, and so is a date-based code. What matters is only that the next one is larger. Starting at 1 with version name 1.0 is the convention and keeps the arithmetic obvious for years.

Read next

Related tools

Ready to turn your site into an app?

Upload an HTML file or a ZIP, set your icon and name, and download a signed Android app. No Android Studio, no command line.

Open the builder