Skip to Content
Sindre Sorhus
Back to Supercharge

Updated

How to Copy the Contents of a File to the Clipboard on Mac

By Sindre Sorhus, who makes the Supercharge app

With Supercharge

  1. Open the settings of Supercharge, click “Tweaks”, and click “Configure…” next to “Context menu items”.
  2. In the “Main Menu” tab, turn on “Copy Contents”.
  3. Right-click a text file in Finder, like a .txt, .md, .json, or .log file, or a script, and choose “Copy Contents”.
  4. Paste the text where you need it.

The item shows only for text files, not for documents like PDF or Pages files.

The right-click items cannot show in synced folders, like iCloud Drive and Dropbox. There, right-click the file, and choose “Services › Copy File Contents”.

Get Supercharge

Elevate your Mac experience

$20, one-time purchase, plus tax where applicable

Requires
macOS 27 or later
Updated
November 2026
Gumroad rating
5.0/5 (288 ratings)

More about Supercharge

Without an app

Open the file in TextEdit, press CommandA to select all the text, and press CommandC.

Or use the pbcopy command in Terminal. Replace the path with your file, or drag the file into the window:

Terminal
pbcopy < ~/Desktop/notes.txt

The built-in ways are fine for a file now and then. Supercharge copies the text with one click, without opening the file.