diff --git a/java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java b/java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
index c0a599c..60d420f 100644
--- a/java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
+++ b/java-overridable/src/com/android/inputmethod/latin/accounts/AccountStateChangedListener.java
@@ -63,4 +63,13 @@
      */
     public static void forceSync(@Nullable String account) {
     }
+
+    /**
+     * Forces an immediate deletion of user's data.
+     * This should only be used for debugging purposes.
+     *
+     * @param account the account to use for sync.
+     */
+    public static void forceDelete(@Nullable String account) {
+    }
 }
diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml
index e1a72c4..5eaac09 100644
--- a/java/res/values/strings.xml
+++ b/java/res/values/strings.xml
@@ -61,6 +61,11 @@
     <string name="cloud_sync_summary" translatable="false">Sync your personal dictionary across devices</string>
     <string name="cloud_sync_summary_disabled_signed_out" translatable="false">Select an account to enable sync</string>
     <string name="sync_now_title" translatable="false">[DEBUG] Sync Now</string>
+    <string name="clear_sync_data_title" translatable="false">[DEBUG] Delete Google Keyboard cloud data</string>
+    <string name="clear_sync_data_summary" translable="false">Deletes your synced data from Google</string>
+    <string name="clear_sync_data_confirmation" translable="false">Your synced data will be deleted. Are you sure?</string>
+    <string name="clear_sync_data_ok" translable="false">Delete</string>
+    <string name="clear_sync_data_cancel" translable="false">Cancel</string>
 
     <!-- Option name for including other IMEs in the language switch list [CHAR LIMIT=30] -->
     <string name="include_other_imes_in_language_switch_list">Switch to other input methods</string>
diff --git a/java/res/xml/prefs_screen_accounts.xml b/java/res/xml/prefs_screen_accounts.xml
index 41642bf..4624885 100644
--- a/java/res/xml/prefs_screen_accounts.xml
+++ b/java/res/xml/prefs_screen_accounts.xml
@@ -48,4 +48,11 @@
         android:persistent="false"
         android:title="@string/sync_now_title"
         android:dependency="pref_enable_cloud_sync" />
+
+    <!-- This preference (acts like a button) enables the user to clear data from the cloud. -->
+    <Preference android:key="pref_beanstalk_clear_data"
+        android:persistent="false"
+        android:title="@string/clear_sync_data_title"
+        android:summary="@string/clear_sync_data_summary"
+        android:dependency="pref_enable_cloud_sync" />
 </PreferenceScreen>
diff --git a/java/src/com/android/inputmethod/latin/settings/AccountsSettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/AccountsSettingsFragment.java
index 4bd15d0..0232853 100644
--- a/java/src/com/android/inputmethod/latin/settings/AccountsSettingsFragment.java
+++ b/java/src/com/android/inputmethod/latin/settings/AccountsSettingsFragment.java
@@ -50,12 +50,15 @@
  */
 public final class AccountsSettingsFragment extends SubScreenFragment {
     private static final String PREF_SYNC_NOW = "pref_beanstalk";
+    private static final String PREF_CLEAR_SYNC_DATA = "pref_beanstalk_clear_data";
 
     static final String PREF_ACCCOUNT_SWITCHER = "account_switcher";
 
     private final DialogInterface.OnClickListener mAccountChangedListener =
             new AccountChangedListener();
     private final Preference.OnPreferenceClickListener mSyncNowListener = new SyncNowListener();
+    private final Preference.OnPreferenceClickListener mClearSyncDataListener =
+            new ClearSyncDataListener();
 
     @Override
     public void onCreate(final Bundle icicle) {
@@ -86,13 +89,18 @@
             removePreference(PREF_ACCCOUNT_SWITCHER);
             removePreference(PREF_ENABLE_CLOUD_SYNC);
             removePreference(PREF_SYNC_NOW);
+            removePreference(PREF_CLEAR_SYNC_DATA);
         }
         if (!ProductionFlags.ENABLE_PERSONAL_DICTIONARY_SYNC) {
             removePreference(PREF_ENABLE_CLOUD_SYNC);
             removePreference(PREF_SYNC_NOW);
+            removePreference(PREF_CLEAR_SYNC_DATA);
         } else {
             final Preference syncNowPreference = findPreference(PREF_SYNC_NOW);
             syncNowPreference.setOnPreferenceClickListener(mSyncNowListener);
+
+            final Preference clearSyncDataPreference = findPreference(PREF_CLEAR_SYNC_DATA);
+            clearSyncDataPreference.setOnPreferenceClickListener(mClearSyncDataListener);
         }
     }
 
@@ -136,7 +144,7 @@
         final String[] accountsForLogin = LoginAccountUtils.getAccountsForLogin(context);
         accountSwitcher.setOnPreferenceClickListener(new OnPreferenceClickListener() {
             @Override
-            public boolean onPreferenceClick(Preference preference) {
+            public boolean onPreferenceClick(final Preference preference) {
                 if (accountsForLogin.length == 0) {
                     // TODO: Handle account addition.
                     Toast.makeText(getActivity(), getString(R.string.account_select_cancel),
@@ -229,7 +237,7 @@
      */
     class AccountChangedListener implements DialogInterface.OnClickListener {
         @Override
-        public void onClick(DialogInterface dialog, int which) {
+        public void onClick(final DialogInterface dialog, final int which) {
             final String oldAccount = getSignedInAccountName();
             switch (which) {
                 case DialogInterface.BUTTON_POSITIVE: // Signed in
@@ -263,4 +271,30 @@
             return true;
         }
     }
+
+    /**
+     * Listener that initiates the process of deleting user's data from the cloud.
+     */
+    class ClearSyncDataListener implements Preference.OnPreferenceClickListener {
+        @Override
+        public boolean onPreferenceClick(final Preference preference) {
+            final AlertDialog confirmationDialog = new AlertDialog.Builder(getActivity())
+                    .setTitle(R.string.clear_sync_data_title)
+                    .setMessage(R.string.clear_sync_data_confirmation)
+                    .setPositiveButton(R.string.clear_sync_data_ok,
+                            new DialogInterface.OnClickListener() {
+                                @Override
+                                public void onClick(final DialogInterface dialog, final int which) {
+                                    if (which == DialogInterface.BUTTON_POSITIVE) {
+                                        AccountStateChangedListener.forceDelete(
+                                                getSignedInAccountName());
+                                    }
+                                }
+                             })
+                    .setNegativeButton(R.string.clear_sync_data_cancel, null /* OnClickListener */)
+                    .create();
+            confirmationDialog.show();
+            return true;
+        }
+    }
 }
