, Convert Chrome Extension to Safari Web Extension

Apple has now made it easier for developers to convert an existing Chrome/Edge/Firefox extension to a Safari Web Extension. In their release of XCode 12, they have introduced the Safari Web Extension Converter tool which gives you the ability to convert extensions made for other browsers to Safari Web Extensions. With XCode 13, you can even convert the extensions into iOS Safari extensions using the same command. What are iOS extensions? And why are they a big deal? Find out here.

Now without further ado, let’s get started.

Note: This needs XCode 12 or greater and Safari 14 or greater.

We will be working with the “NewTabWallpaper” extension built for Chrome which shows new wallpaper with its location whenever a new tab is opened.

Download or clone the project at, migrating-chrome-extension-to-safari-example.

, Convert Chrome Extension to Safari Web Extension

Let’s convert this extension to a Safari Web Extension.

Select the correct XCode for conversion

Open the terminal in macOS and select the right XCode if you have multiple versions installed.

sudo xcode-select -s <Supported XCode app path>

Convert the extension

Run the  XCode command-line tool to convert the extension.

xcrun safari-web-extension-converter <path to extension>

This will create a new project for Safari Web Extension and will open the project in Xcode.

Run the Safari Extension

Build the project through the start button. Make sure the macOS scheme is selected.

, Convert Chrome Extension to Safari Web Extension

It will open a popup like the one below once it’s built and running.

, Convert Chrome Extension to Safari Web Extension
  • Click “Quit and Open Safari Extension Preferences.”
  • This opens Safari Preferences with an extensions list.
  • Tick the checkbox next to the “NewTabWallpaper” extension to enable it.
  • If an extension is not visible in the list, you may want to allow unsigned extensions.
  • Safari Preference > Advances > Check “Show Develop menu in menu bar” then,
  • Menu bar > Develop > Allow Unsigned Extensions. Now, enable the extension from the extensions list.
  • Once the extension is enabled, you will get a popup asking for consent.
, Convert Chrome Extension to Safari Web Extension
  • Click “Use for New Windows and Tabs”.
  • Now, open a new tab in Safari Browser and you can see it working.
, Convert Chrome Extension to Safari Web Extension

I used XCode 13 to convert this extension, So you can see it running on iOS Safari too.

, Convert Chrome Extension to Safari Web Extension

Assess browser compatibility

Once you decide to convert your extension to a Safari extension, here is all you will need to know before migrating.

Moreover, Safari Web Extension has some limitations while working with web extension APIs. It will be wise to assess your extension compatibility with other browsers and vice-versa. Apple has that covered in this article.

VSH Solutions has over a decade of experience developing browser extensions. If you have any questions or queries about building/converting an extension, our dedicated Safari extension and plugin development team will be happy to answer them for you. Just drop us a line at Browser Extension Services.

Leave a Reply