When I google for images of "apple sauce" (without the quotes), Safari's location bar just displays "apple sauce" (without the quotes) rather than the URL leading to Google searching for apple sauce images.

I want to send someone the search URL. How can I get it from Safari?


Like suggested elsewhere, you can drag the search text from the URL bar into some plain text view. However, one can also directly drag it into a (rich text) email or chat message. Or into Google's search field which is conveniently close to Safari's location bar:

Dragging search terms into search field

(In previous versions, you could drag the magnifying glass icon; in 2016 versions just drag the search text like shown above.)

After dragging into Google's search field, the additional search text is already selected and focussed, ready for Command+C:

After dragging

(In earlier versions, Safari's location bar will still have focus, and the URL in Google's search input will be gray, not blue. In those versions one could first hit Tab after searching to go into Google's search field, hit Delete to clear it, and then drag the icon. After that, the search field is ready for Command+C as well.)

The Share button to the right of the location bar can also share the URL, but probably only when messaging has been configured:

Safari 6 in Mountain Lion Share button

As an aside: the Google URLs include a lot of irrelevant things, specific to your browser, language, etc. Often, it's enough to use www.google.com#q=elvis+is+alive, or for image search www.google.com#tbm=isch&q=elvis+is+alive, but then one needs to change the spaces into plus-characters to ensure it's clickable. (And one also needs to percent-encode other special characters.) It would be nice if Google would provide some bare sharing link on its own site.

  • I swear to God, this trick worked for me yesterday, but now it doesn't. Dragging the magnifying glass does nothing. Help? – Calion Sep 8 '16 at 1:08
  • Very oddly, holding down Control turns the magnifying glass into an Earth icon, but then clicking on it shows "Customize Toolbar." WTF? – Calion Sep 8 '16 at 1:10
  • @Calion, I updated the screenshots & instructions. – Arjan Sep 8 '16 at 11:15

It's not a very elegant solution, but you can make a bookmarklet that will open a pop-up dialog with a copiable version of the URL.

To do this, bookmark any page you happen to have handy, then open the Bookmarks manager (Bookmarks > Show All Bookmarks), and edit the address of that bookmark to be javascript:alert(location.href);. Change the name to whatever you want.

Then when you click it, you should get a popup that looks like this: example popup

  • 1
    javascript:prompt("Here's your URL", location.href) is even easier. – Arjan Aug 5 '12 at 10:38
  • 1
    Even better, when you put this on the bookmarks bar, it's automatically assigned a hot key. By pressing [command] + [#] (where the # is it's location from left to right) you can open it. For example [command]+[5] will open the 5th thing on the book marks bar – Alexander Aug 10 '12 at 18:45

You could also drag the favicon to a plain text view.

Or assign a shortcut to a script like this:

tell application "Safari" to URL of document 1
set the clipboard to result

It's simple. Copy apple sauce or whatever you see in the address bar and paste it wherever you want to. You might feel stupid doing this, but the result will be the full URL, not the search term you saw before copying. This works for me in Safari 10.0.

  • Exactly that doesn't work and that's the problem. – Andrew J. Brehm Oct 9 '16 at 12:43
  • @AndrewJ.Brehm It works if you paste it into some 'reach text' area, like built in MacOS Notes.app. However, it appears as text link, which is clickable. Maybe useful in some cases I still wonder how it is possible to bring such a pain to users, apparently smart guys work at Apple – ololobus Dec 14 '17 at 8:39
  • It works to paste it into Safari bookmarks, for example. Even though the text shows "apple sauce", once pasted, the correct URL is revealed. – auspicious99 Oct 31 '20 at 8:05

I've created a Safari Extension: Get URL that highlights the current URL. It's less invasive than a bookmarklet and it's pre-selected, too.

  • Your extension was completely disabled and removed by Safari 12 – Sparky Apr 4 '19 at 20:12

:for I pad:

Double tap the URL and select the URL and tap again and tap copy then double tap where you want to payst it and tap past

:For computer:

click and hold and drag your mouse accross where you want to copy click with mouse2 (the right one) and click past

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .