How can I copy the filenames of attachments in Gmail?

I can't find a good way in the new interface that was introduced last year:

enter image description here

I don't want to have to download the attachment to get the filename.

4 Answers 4


The easiest thing I've found is to select "Show Original" from the message menu, then search with my web browser (Ctrl+F) for "Content-Disposition". That jumps me to the part of the email message where the attachment (or one of the attachments) is encoded. One of the pieces of meta data is the filename.

snippet of encoded file attachment in email original text


We faced the same issue. I've found the easiest way to just copy the filename is to:

  1. Click on the download link, as if you were to download the file.

gmail Attachment 01

  1. When the pop-up window opens, copy the filename and cancel the download.

gmail Attachment 02


Click on the flipped corner in the bottom right of the attachment. It will open the attachment in preview mode. You can copy the file name in the bar at the top left.


You can copy the file name directly from the email if you switch to basic HTML view of gmail using this link:


Gmail will look a lot different and may not have all the functionality that the standard view does. For more info on Standard View vs basic HTML view see this Google Help Article.

Alternative 2

This way is probably not ideal but it does work - I've also only tried this in Firefox and Chrome. If you right click directly on the file name text on the attachment like this

enter image description here

Then choose Inspect Element. It will open the Developer tools and you should see a span element that has your file name. You can copy the filename directly from there.

enter image description here

  • Preview implies a download. If the file is large, it takes a log time, just to get to the filename.
    – Aganju
    Apr 8, 2016 at 11:20
  • @Aganju technically yes that is true. But the answer prevents downloading file to system, finding in a file manager and then copying the files name. The OP is also showing a few .py files that are around 1KB each so wouldn't take much time to preview those files.
    – tyelford
    Apr 8, 2016 at 23:47
  • Yet another alternative: Use inbox.google.com - It lets you copy the attachments title. :) Apr 17, 2016 at 6:06
  • @DeepakKamat I wasn't able to get it to work with inbox. The attachments that I get are more-or-less the same as regular gmail but styled differently. Code files (html, css etc) just show up as a box with the name of the files, but I was unable to select the text. Images show up as a small thumbnail with no file name.
    – tyelford
    Apr 17, 2016 at 11:01
  • @tyelford However I am able to select the text right from the thumbnail by clicking&dragging my mouse over the box. See this screenshot for example (I tried with a CSS file): i.imgur.com/jYI82iN.jpg Apr 17, 2016 at 19:30

Install extension "Copy Link name" at https://chrome.google.com/webstore/detail/copy-link-name/mafjnaphoepgijmgfeemillelgkeigid.

Put cursor over attachment filename, right-click and select Copy Link name.

  • Please disclose in your answer if you are affiliated with the extension in any way.
    – jonsca
    Jun 12, 2019 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.