How to use a Safari bookmarklet to send websites to 1Password for iOS

By , Jan 16, 2014

1password for mac

Despite Apple’s pretty handy password-saving and syncing feature in iOS Safari, I myself continue to prefer AgileBits’ 1Password for iOS and OS X (our own Jeff is a recent convert, too). The reason is simple: 1Password allows me to save and sync just about any piece of information rather than just passwords and credit cards.

There’s just one slight annoyance: to take advantage of 1Password’s auto-fill feature for usernames and passwords, I must open a website in its built-in browser.

I generally tend to avoid the embedded web view in third-party apps and instead spend most of my mobile web browsing time in Safari. From now on, whenever you want to visit a website that requires a login, you can use this handy Safari bookmarklet to send the current tab to 1Password.

Though far from perfect, this removes some of the friction when visiting websites that require logins and auto-fill information kept in 1Password…

First, we need to create the bookmarklet, here’s how.

Step 1: Copy this Javascript code

Fire up Safari, open this article, tap and hold on the below block of JavaScript text to select it, release the finger and choose Copy to store the text in the system clipboard:

javascript:window.location='op'+(window.location.href)

Safari bookmarklet (Open in 1Password 003)

Step 2: Bookmark this page

Tap Safari’s Share button and then the Bookmark icon. File that bookmark into a desired location and choose Save in the upper right. Safari defaults to Favorites, but you can create custom folders, if you like.

Safari bookmarklet (Open in 1Password 005)Safari bookmarklet (Open in 1Password 004)

Step 3: Edit your bookmark

Open the Bookmarks menu by hitting Safari’s Bookmarks icon (second on the right alongside the bottom). Navigate to your bookmark folder,, hit Edit in the lower right and tap the newly saved bookmark.

Safari bookmarklet (Open in 1Password 006)Safari bookmarklet (Open in 1Password 007)

You should change the bookmark’s name here to a more friendly ‘Open in 1Password’, or anything you like. Now tap on the address field below and clear the URL by hitting the ‘x’. Tap and hold to paste the Javascript code you copied in Step 1.

Step 4: Save the changes

Finish editing the bookmark by tapping Done on the virtual keyboard. Tap Done in the lower right to leave the editing mode and then hit Done in the upper right to save your changes and close the Bookmarks menu.

That’s it!

To open a web page in 1Password’s embedded browser, open it in Safari and choose the bookmarklet from the Bookmarks menu to send the current tab to 1Password.

Safari bookmarklet (Open in 1Password 001)Safari bookmarklet (Open in 1Password 002)

As a pair of screenies above illustrate, now I can visit login-protected websites like paypal.com in Safari and send them to 1Password to use it auto-fill feature that automatically fills in my PayPal credentials from 1Password’s database.

One final tip: if you’re going to be using this bookmarklet a lot, consider increasing 1Password’s Master Password request time to something like ten minutes (even better, create a Quick Unlock Code), which will help cut down on the time wasted unlocking 1Password during app switching.

I hope you’ll find this bookmarklet useful in everyday use.

If you’re jailbroken, check out handy 1Password tweaks such as 1Pal which saves your Master Password to the iOS keychain for quick logins (works in tandem with Touch ID tweaks like BioLockdown) or PassIt that’ll add an ‘Open in 1Password’ item to Safari’s Share menu.

1Password for the iPhone and iPad is currently $17.99 in the App Store.

The Mac edition is available for $49.99 in the Mac App Store.

Hat tip to Agile Bits’ Agile Samurai for creating the bookmarklet.

  • Share:
  • Follow:
  • ✪ aidan harris ✪

    I posted this in the 1Pal comments section but I’ll post it here to. I prefer using this bookmarklet instead of the one above since it just performs a search for passwords which I can then copy and paste back into Safari or whatever browser I was using:

    javascript:window.location=’onepassword://search/’+window.location.hostname

    • Terry Cooke

      Great than you, i could not get the idv one to work for some reason, but yours works a treat. Thank you.

      • ebernet

        If you retype the single quotes it should work for you. The ones in the bookmarklet in the article are not the right single quote character…

      • Terry Cooke

        Sweet thank you it worked.

  • http://www.idownloadblog.com/author/dujkan Christian Zibreg

    Fixed JavaScript code with the correct single quote character, works now

  • http://www.bearsstillsuck.com/ Simon

    Yeah, I’m good with the way more convenient built it Apple feature than dealing with all that you just posted above. That just sold me to stick with what already works pretty well.

    • D R

      The above stuff you only need to do ONCE, afterwards it is very straightforward to actually use. I would rather use this with 1password instead of giving Apple access to all my important passwords [and make no mistake, even though they claim they don’t access your information, they are capable of decrypting/accessing it].

  • Raashid

    It’s funny people are stil paying for this stuff…wonder what it’s got to offer me over LastPass for those rip-off price tags…fyi password sync ain’t one of those things.