How to Get SHA1 key in Flutter|SHA-256 Flutter Firebase

Getting a SHA1 key in Flutter is crucial for various tasks, such as integrating APIs, enabling Firebase services, and ensuring app security. In this comprehensive guide, we will walk you through the process of obtaining a SHA1 key in Flutter, step by step.

What is a SHA1 Key?

A SHA1 key, short for Secure Hash Algorithm 1, is a unique identifier generated from specific input data, commonly used in cryptography and security protocols. In the context of Flutter development, the SHA1 key is essential for authenticating your app with external services and APIs.

How to Get SHA1 key in Flutter?

Now Sharing easy and fast tricks with you. You can generate SHA-1 or SHA-256 key Flutter. Following these steps.


Open Your Flutter Terminal. Type: cd android (cd means Change Directory).

cd android


Then type –

gradlew signinReport


Flutter sh key
Flutter SigninKey

Show Result SHA-1 or SH-256 Key:

Flutter sha1 key

If don’t understand properly. Please watch this video with a live example

Generate sha1 key for Firebase flutter

How to Find Play Console SHA-1 Fingerprint Certificate:

how to get sha1 key in Flutter vscode?

To generate a SHA1 key in Flutter using Visual Studio Code (VSCode), you can follow these steps:

  • Open your Flutter project in VSCode.
  • Make sure you have the Flutter and Dart extensions installed in your VSCode environment.
  • Open the terminal in VSCode by selecting “View” from the menu bar, then “Terminal.”
  • In the terminal, navigate to the root directory of your Flutter project using the cd command.
  • Run the following command to generate the SHA1 key:
flutter build apk --debug

This command will build the APK in debug mode, and during the build process, it will display the SHA1 key in the terminal.

Once the build process is complete, look for the line in the terminal that starts with “Signing certificate,” followed by the SHA1 key.

Here’s an example of what the output might look like:

Signing certificate will expire on 2023-01-01.
SHA1: AB:CD:EF:12:34:56:78:90:AB:CD:EF:12:34:56:78:90:AB:CD:EF:12

That’s it! You have successfully obtained the SHA1 key for your Flutter project using VSCode.

Note: The above steps assume you are building an APK for Android. If you are building for iOS, you would need to use Xcode and a different method to obtain the SHA1 key.

how to get sha1 key in flutter android studio

To generate a SHA1 key in Flutter using Android Studio, you can follow these steps:

Step 1: Open your Flutter project in Android Studio.

Step 2: Open the Android folder within your project structure.

Step 3: Navigate to the app folder and expand it.

Step 4: Right-click on the “app” folder and select “Open Module Settings” or press F4.

Step 5: In the “Project Structure” window, click on the “Flavors” tab.

Step 6: Select the “android” flavor if it’s not already selected.

Step 7: In the “Signing Config” dropdown, choose “debug”.

Step 8: Click on the “OK” button to close the “Project Structure” window.

Step 9: Open the terminal within Android Studio by navigating to “View” -> “Tool Windows” -> “Terminal.

Step 10: In the terminal, enter the following command:

./gradlew signingReport

Step 11: Press Enter to execute the command.

Step 12: Wait for the command to finish executing. It will display various pieces of information, including the SHA1 key.

Step 13: Look for the line that starts with “Variant: debug” and find the SHA1 key in the corresponding line.

The SHA1 key will typically be displayed in a format like this: “SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX”.

By following these steps, you should be able to obtain the SHA1 key for your Flutter Android project in Android Studio.

Leave a Comment