google-services.json Validator

Parse and validate google-services.json for Firebase Android — package names, project_info, clients, and API keys

Paste or upload your file
Output will appear here...

What is google-services.json Validator?

The google-services.json file is the central configuration artifact that connects an Android application to its Firebase project. It carries the project identifier, mobile app ID, API keys, OAuth client credentials, and storage bucket references that the Firebase SDK needs at initialization time. The Google Services Gradle plugin reads this file during the build process and injects its values into Android resource strings, making them available to Firebase Analytics, Cloud Messaging, Remote Config, and every other Firebase service. A missing or malformed google-services.json is one of the most common reasons Firebase integration fails at compile time.

How to Use

  1. In Parse mode, paste or upload an existing google-services.json to validate its structure and inspect every field in a readable layout
  2. In Generate mode, fill in your Firebase project details — Project ID, Package Name, and API Key are mandatory — to produce a syntactically correct file
  3. Upload a file from your workstation to check for missing fields, invalid keys, or mismatched package names before you ship
  4. Download the generated file and place it in your Android project's app/ root directory so the Gradle plugin can process it
  5. Review the validation results — errors block compilation, while warnings indicate optional fields that may cause runtime issues

Why Use This Tool?

Catches structural problems in google-services.json before they cause cryptic Gradle build failures
Generates a valid configuration file from scratch when you cannot access the Firebase Console directly
Reports missing required fields, incorrect API key formats, and package name mismatches with specific error messages
Parses and pretty-prints the entire file so you can quickly verify every value at a glance
One-click download produces a file ready to drop into your Android project without manual editing
Includes a sample template for learning the expected structure without needing a real Firebase project

Tips & Best Practices

  • Always download the production google-services.json from the Firebase Console rather than generating one manually — Console-generated files include all OAuth client entries
  • Commit google-services.json to version control, but restrict the API keys in the Firebase Console to your app's signing certificate SHA-1 fingerprint
  • Use separate google-services.json files for debug and release build types by placing them in the appropriate source set directories (src/debug and src/release)
  • Verify that the package_name field exactly matches the applicationId in your app-level build.gradle — a mismatch causes Firebase services to silently fail
  • Never expose Firebase API keys in public repositories without applying app-level restrictions in the Firebase Console

Frequently Asked Questions

What is google-services.json and why is it required?

google-services.json is a configuration file that the Google Services Gradle plugin processes during your Android app's build. It extracts project_id, mobilesdk_app_id, API keys, and other values, then injects them as Android string resources. Without this file, the plugin throws a build error, and Firebase services like Analytics, FCM, and Auth cannot initialize at runtime.

How do I generate google-services.json from the Firebase Console?

Navigate to your Firebase project, click the gear icon next to Project Overview, select Project Settings, scroll to the Your apps section, and choose Add app (Android). Enter your package name and SHA-1 fingerprint, then click Register app. The Console will generate and offer a download link for the file. This tool provides an alternative when you need a file quickly without Console access.

Can a single google-services.json serve multiple apps?

Yes. The client array can contain multiple entries, each with its own package_name and API keys. This is common when your Firebase project hosts several Android apps or when you maintain debug and release variants under the same project. The Gradle plugin automatically selects the client entry whose package_name matches your applicationId.

When should I NOT use this generator?

Avoid generating google-services.json manually for production apps. The Firebase Console produces a more complete file that includes all OAuth client entries, correct project numbers, and proper messaging sender IDs. Use this generator for quick prototyping, testing, or recovering a lost file when Console access is temporarily unavailable.

Is my data private when using this tool?

Absolutely. All parsing, validation, and generation happen entirely in your browser. Your Firebase configuration data — including API keys and project identifiers — is never sent to any external server, logged, or stored. The tool works offline once the page has loaded.

How do I fix a mismatched package name error?

The package_name in google-services.json must exactly match the applicationId in your app-level build.gradle file. If you recently renamed your app's package, update the google-services.json accordingly — either download a fresh copy from the Firebase Console with the new package name, or use this tool's Generate mode to create a new file with the corrected value.

Real-world Examples

Validating a downloaded google-services.json before integration

After downloading the config file from Firebase Console, you validate it to ensure no fields were corrupted during download and that the package name matches your app.

Input
{
  "project_info": {
    "project_number": "123456789012",
    "project_id": "my-firebase-project",
    "storage_bucket": "my-firebase-project.appspot.com"
  },
  "client": [{
    "client_info": {
      "mobilesdk_app_id": "1:123456789012:android:abc123",
      "android_client_info": { "package_name": "com.example.myapp" }
    },
    "api_key": [{ "current_key": "AIzaSyC1234567890abcdefghijklmnop" }]
  }]
}
Output
Valid google-services.json
Project ID: my-firebase-project
Client 0 package: com.example.myapp
Client 0 API keys: 1

Generating a config file for a new Firebase Android app

You created a new Firebase project and need a google-services.json to start development before the Console UI finishes provisioning all services.

Input
Project ID: my-new-app | Package: com.startup.myapp | API Key: AIzaSyD... | App ID: 1:987654321:android:xyz789
Output
{
  "project_info": {
    "project_number": "987654321",
    "firebase_url": "https://my-new-app.firebaseio.com",
    "project_id": "my-new-app",
    "storage_bucket": "my-new-app.appspot.com"
  },
  "client": [{
    "client_info": {
      "mobilesdk_app_id": "1:987654321:android:xyz789",
      "android_client_info": { "package_name": "com.startup.myapp" }
    },
    "api_key": [{ "current_key": "AIzaSyD..." }]
  }],
  "configuration_version": "1"
}

Related Tools