# How to Encrypt Text in Shortcuts on iPhone and Mac

Updated: November 24, 2026

- [Actions](https://sindresorhus.com/actions.md): Additional actions for the Shortcuts app. Price: Free. Platforms: macOS, iOS, visionOS. Get it from: [App Store](https://apps.apple.com/app/id1586435171). Requires macOS, iOS, or visionOS 26 or later. Size: 13 MB on Mac, 29 MB on iPhone and iPad. Free older versions for macOS 15, 14, 13, and 12: [download](https://sindresorhus.com/actions#older-versions). US App Store rating: 4.8/5 (703 ratings).

URL: https://sindresorhus.com/guides/encrypt-text-shortcuts

Add the “Encrypt Text” action of the free [Actions](https://sindresorhus.com/actions.md) app, give it the text and a key of 32 characters, and it returns the encrypted text. To read it again, set the action to “Decrypt”, and use the same key. [Without an app](https://sindresorhus.com/guides/encrypt-text-shortcuts#without-an-app), the Shortcuts app has no action that encrypts text.

## With Actions

1. Install [Actions](https://sindresorhus.com/actions.md), and open it once.
1. In your shortcut, add the [“Encrypt Text”](https://sindresorhus.com/actions#:~:text=Encrypt%20Text) action of Actions.
1. Put the text in the action, and type a key of exactly 32 English letters and digits, like a random password.
1. Run the shortcut. The result is the encrypted text, which you can save in a file or send.
1. To decrypt, make a shortcut with the same action, choose “Decrypt” in place of “Encrypt”, and give it the encrypted text and the same key.

The action uses AES-256-GCM, and works on the device: nothing leaves it. The encrypted text is Base64 text, so you can paste it anywhere. Without the key, nobody can read it, also not you, so keep the key safe.

- Do not put the key in a shortcut that you share. Read it from a file on your device, like with the “Get File from Folder” action.
- To encrypt a photo or another file, use the “Encrypt File” action of Actions.

## Without an app

The Shortcuts app can change text to Base64 with the “Base64 Encode” action, but that is not encryption: anyone can decode it.

To keep a text private without a shortcut, put it in a locked note in the Notes app.
