How to back up Tampermonkey to Google Drive

Tampermonkey stores your userscripts in your browser's local storage, which means they vanish if you uninstall the extension, switch browsers, or reinstall your operating system. The fastest way to protect them is to export your scripts directly to Google Drive, where they stay safe and accessible from any device. You can do this through Tampermonkey's built-in backup feature in about five minutes.

The process works the same way in Chrome, Firefox, Edge, and Opera. You open Tampermonkey's dashboard, find the backup option, and choose Google Drive as your destination. Tampermonkey handles the authentication with Google—you just approve the connection once, and from then on your scripts sync automatically or on demand.

Key Takeaways

  • Tampermonkey's dashboard has a built-in backup feature that connects directly to Google Drive without needing third-party tools.
  • You need to authorize Tampermonkey to access your Google Drive account the first time you back up, but this is a one-time step.
  • Backups include all your scripts, their settings, and metadata, so restoring them later puts everything back exactly as it was.
  • You can back up manually whenever you add or change scripts, or set Tampermonkey to back up automatically at intervals you choose.

Opening Tampermonkey's dashboard and finding the backup menu

Click the Tampermonkey icon in your browser's toolbar—it looks like a monkey head. A dropdown menu appears. Select Dashboard (or Manage scripts in some browsers). This opens the main Tampermonkey window where all your installed scripts are listed.

In the Dashboard, look for the Utilities tab at the top. Click it. You'll see several options including Backup/Restore. This is where you control where your scripts go and how often.

Connecting Tampermonkey to your Google Drive account

In the Backup/Restore section, you'll see a dropdown menu that currently says Browser or Dropbox or similar. Click this dropdown and select Google Drive. A blue button labeled Authorize or Connect appears below it.

Click the Authorize button. Your browser opens a Google sign-in page. Log in with the Google account where you want your scripts stored. Google then asks you to confirm that Tampermonkey can access your Drive. Click Allow. The page closes and you're back in Tampermonkey—the authorization is complete and you won't need to do this again.

If you have multiple Google accounts, make sure you're signed into the one you want to use before clicking Authorize. Tampermonkey will back up to whichever account you're logged into at that moment.

Choosing backup settings and running your first backup

After authorization, the Backup/Restore section shows new options. You can choose whether backups happen manually (you click a button each time) or automatically (Tampermonkey backs up on a schedule). If you pick automatic, you'll see a dropdown to set the interval—usually daily, weekly, or monthly.

For most users, manual backup works fine. You back up after you add a new script or make changes to existing ones. Click the Backup button. Tampermonkey creates a file with all your scripts and sends it to a folder in your Google Drive called Tampermonkey. The backup completes in seconds.

If you want automatic backups, select your preferred interval and Tampermonkey handles the rest. You can still click Backup manually anytime you want an extra copy.

Verifying your backup in Google Drive

Open Google Drive in a new tab. Look for a folder named Tampermonkey in your Drive's root directory (the main folder view). Open it. Inside you'll see backup files with names like tampermonkey.backup.json and a timestamp. Each backup is a separate file, so you can keep multiple versions if you want.

Right-click any backup file and select Get link to see when it was created and confirm it's there. You don't need to do anything with these files—they're just sitting safely in your Drive. Tampermonkey knows where they are and can restore from them anytime.

Restoring scripts from a Google Drive backup

If you need to restore your scripts—whether you're on a new device, switched browsers, or reinstalled Tampermonkey—go back to the Dashboard, click Utilities, and open Backup/Restore. Make sure Google Drive is still selected in the dropdown. Click the Restore button.

Tampermonkey shows you a list of available backups from your Google Drive, with dates and file sizes. Select the backup you want and click Restore. Tampermonkey downloads the file and reinstalls all your scripts with their original settings. This usually takes less than a minute.

After restoration, refresh any pages where you use those scripts. They'll start working when ready with all their original configurations intact.

Troubleshooting common backup issues

If the Authorize button doesn't work, make sure you're not in an incognito or private browsing window—Google's authentication doesn't work there. Close the window and try again in a normal browser tab.

If Tampermonkey says it can't connect to Google Drive, check that you're actually signed into Google in your browser. Click your profile icon in the top right of any Google page. If you see "Sign in" instead of your email, log in first, then try authorizing Tampermonkey again.

If a backup fails silently with no error message, open your Google Drive and check that the Tampermonkey folder exists and isn't full. Google Drive accounts have storage limits—if you're out of space, backups won't work. Delete old backups or upgrade your storage plan.

If you restore a backup and some scripts don't appear, check that you restored from the correct file. Tampermonkey creates a new backup each time you run one, so older files might not have all your current scripts. Look for the most recent backup file by date.

Frequently Asked Questions

Do I need to manually back up every time I add a new script?

No, but it's a good habit. If you turn on automatic backups, Tampermonkey backs up on the schedule you set. If you stick with manual backups, you only need to click Backup after you add or significantly change a script. For scripts you rarely touch, one backup a month is usually enough.

Can I back up to multiple cloud services at once?

Tampermonkey lets you pick one destination at a time—Google Drive, Dropbox, or your browser's local storage. You can't back up to both simultaneously through the built-in feature. If you want redundancy, back up to Google Drive, then manually read a backup file and store it elsewhere.

What happens to my Google Drive backup if I uninstall Tampermonkey?

The backup file stays in your Google Drive forever. Uninstalling Tampermonkey doesn't touch your Drive. When you reinstall Tampermonkey later, you can restore from that same backup file and get all your scripts back.

Can I share my Tampermonkey backup with someone else?

Yes, but be careful. A backup file contains all your scripts and their settings. You can right-click the backup file in Google Drive, click Share, and send the link to someone. They can read it and restore it into their own Tampermonkey. Only share with people you trust, since they'll get access to everything your scripts do.

How much storage space does a Tampermonkey backup use?

Most backups are tiny—usually under 1 MB even with dozens of scripts. Unless you have hundreds of large scripts with lots of data, backups won't make a dent in your Google Drive storage. You can keep years of backups without running out of space.