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

Updated: November 24, 2026

- [Supercharge](https://sindresorhus.com/supercharge.md): Elevate your Mac experience. Price: $20, one-time purchase, plus tax where applicable. Platforms: macOS. Get it from: [Gumroad](https://sindresorhus.gumroad.com/l/supercharge?wanted=true), [Setapp](https://go.setapp.com/stp181?refAppID=742&utm_medium=vendor_program&utm_content=button). Free trial: [download](https://sindresorhus.com/supercharge#trial). Requires macOS 27 or later. Size: 10 MB. Free older versions for macOS 26 and 15: [download](https://sindresorhus.com/supercharge#older-versions). Gumroad rating: 5.0/5 (288 ratings).

URL: https://sindresorhus.com/guides/copy-file-contents-mac

Right-click a text file in Finder, and choose “Copy Contents” from [Supercharge](https://sindresorhus.com/supercharge.md). [Without an app](https://sindresorhus.com/guides/copy-file-contents-mac#without-an-app), run `pbcopy < file.txt` in Terminal. You can then paste the text, like a log or a settings file, in a message or an issue.

## With Supercharge

1. Open the settings of [Supercharge](https://sindresorhus.com/supercharge.md), click “Tweaks”, and click “Configure…” next to “Context menu items”.
1. In the “Main Menu” tab, turn on “Copy Contents”.
1. Right-click a text file in Finder, like a `.txt`, `.md`, `.json`, or `.log` file, or a script, and choose “Copy Contents”.
1. 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”.

## Without an app

Open the file in TextEdit, press Command+A to select all the text, and press Command+C.

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

```console
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.
