Choose an Android app package name by reversing a domain you own and adding the app’s name, all in lowercase: a site at brightbakery.com becomes com.brightbakery.orders. Each part must start with a letter and use only letters, digits or underscores. Pick carefully, because Google Play never lets you change it for a published app.
What an Android app package name is
An Android app package name is the app’s permanent ID on the phone and on Google Play. The Android app module guide calls it the application ID, and says it uniquely identifies the app on the device and in the Play Store.
The two terms mean the same thing. Per the guide, some Android APIs still say “package name” when they mean the application ID; Context.getPackageName() returns the application ID.
The name never shows on the home screen. Users see your app name and icon, while Android and Play use the ID behind them.
The rules a valid package name must follow
Android’s rules for the application ID are stricter than plain Java package names. The guide lists three:
- At least two segments, separated by dots.
bakeryalone fails;com.bakerypasses. - Each segment starts with a letter.
com.bakery.2gofails because the last part starts with a digit. - Only letters, digits and underscores,
[a-zA-Z0-9_]. No hyphens, spaces or accents.
Capitals pass these rules, but the Java naming convention writes the first part in lowercase ASCII, and almost every app on Play uses all lowercase. Use lowercase for every segment. Nobody should have to guess which letters were capitals.
How to build the name from your domain
The usual pattern is your reversed domain, then the app. The Java specification gives the method: take a domain you have, such as oracle.com, and reverse it to com.oracle. The first part should be a top-level domain such as com, org or net, or a two-letter country code.
A 2011 post on the Android Developers Blog, Things That Cannot Change, explains why: domain ownership helps avoid name collisions with other developers.
A simple three-part structure covers most apps:
- Reversed domain:
com.brightbakery - App or product:
.orders - Optional variant, only when you really ship several apps:
.staff
Keep it short and boring. Avoid version numbers, years or words like free, since the name outlives every one of those labels.
Turning awkward domains into valid IDs
Real domains often break the rules, and the Java convention and Android’s rules handle them differently. This table shows the conversions I’d use.
| Your domain | Java convention suggests | Valid on Android? | What I’d use |
|---|---|---|---|
bright-bakery.com |
com.bright_bakery |
Yes | com.bright_bakery.orders or com.brightbakery.orders |
3dprint.shop |
shop._3dprint |
No, segment starts with _ |
shop.threedprint.app |
new.co.in |
in.co.new_ (new is a Java keyword) |
Passes the three rules, but reads oddly | in.co.newsite.app |
mybakery.com |
com.mybakery |
Yes | com.mybakery.orders |
The Java specification says to turn a hyphen into an underscore, append an underscore to Java keywords, and prefix an underscore to parts that start with a digit. That last fix fails Android’s rule that each segment must start with a letter, so spell the number out or add a word in front instead.
Underscores are legal, but dropping the hyphen (brightbakery) reads more cleanly. Pick one before the first release.
No domain? Use a name only you would pick
You don’t need to own a domain to publish. The domain convention exists to make collisions unlikely, so any prefix that only you would choose does the same job.
A personal pattern such as com.yourname.appname or io.github.yourusername.appname is common for indie developers. Stay away from names tied to brands you don’t own; a package name that suggests another company’s product invites confusion and policy trouble.
Never ship com.example. It’s the sample name in templates and documentation, and Google Play refuses it with an error saying a different package name is needed because “com.example” is restricted, as developers report in this Stack Overflow thread.
Why you can’t change it after publishing
A package name is fixed for the life of a Google Play listing. The Android guide warns that if you change the application ID, the Play Store treats the upload as a completely different app. Updates also need the same signing certificate.
The Android Developers Blog post says switching names gives you an entirely new application, installed alongside the old one instead of replacing it. Existing users keep the old app and never receive your new builds.
Deleting the app doesn’t free the name either. According to Play Console help, a deleted app’s package name is reusable only if it had zero installs. With any installs, no app can reuse it, including apps from the same developer account.
If you’re already stuck with a name you regret, the options are covered in changing a package name after publishing.
Package name versus namespace in Android Studio
Android Studio projects have two similar settings: applicationId and namespace. Play and Android see the application ID; the namespace is the Kotlin or Java package for the generated R and BuildConfig classes.
The module guide recommends keeping both the same and setting applicationId explicitly. If you leave it out, the ID copies the namespace, so a later code refactor could silently change your app’s identity.
The same guide adds a note for WebView apps: consider using your code’s package name as a prefix of the application ID, or you may hit a known WebView bug (Issue #37026699). Keeping both values identical sidesteps it.
Choosing a package name in a no-code builder
A no-code builder asks for the package name once, near the start, and the same rules apply. In Web2Apk you set the app name and package name in the project, and its guides say to choose it before you distribute your first release.
The builder also ties updates to that name. A different package name creates a separate app, and updates need the same name plus the same signing key and a higher version code. Version codes are tracked per package name in your browser, so a project backup should travel with the key. The signing and updates guide walks through that.
One limit: a builder can check the format, but it can’t tell you whether a name is already taken on Google Play. You only find that out when you create the app in Play Console, so search Play for your intended name first.
A quick checklist before your first build
Check these before you build anything you plan to share:
- Is it your reversed domain or personal prefix, plus the app name?
- Does every segment start with a letter, with no hyphens or spaces?
- Is it all lowercase, with no version numbers or years?
- Did you remove
com.examplefrom every field? - Have you saved it with your signing key backup?
FAQ
Can I change my Android package name after publishing?
Not for the same listing. Google Play treats an upload with a new application ID as a completely different app, so users of the old one never get it as an update. You would publish a second app and move users across.
What package name should I use if I don’t own a domain?
Use a name you control and that nobody else is likely to pick, such as com.yourname.appname. The domain convention exists to avoid collisions, so the goal is uniqueness. Buying a domain later doesn’t require changing a published app.
Why does Google Play say com.example is restricted?
com.example is the sample name used in templates and documentation, and Google Play refuses uploads that use it. Replace it with your own reversed domain or name before your first upload.
Can a package name contain hyphens or capital letters?
Hyphens aren’t allowed; Android accepts only letters, digits and underscores, and each segment must start with a letter. Capitals are technically allowed, but the naming convention is all lowercase, and lowercase avoids confusion.
Can I reuse the package name of an app I deleted?
Only if the deleted app had zero installs. Play Console help says a deleted app with any installs locks its package name, even for the same developer account.