Skip to Content
Back to Actions

Updated

How to Read a CSV File in Shortcuts on iPhone and Mac

By Sindre Sorhus, who makes the Actions app

With Actions

  1. Install Actions, and open it once.
  2. In your shortcut, add the “Parse CSV” action of Actions.
  3. In “CSV”, choose the file, or select the result of an earlier action, like “Select File” or the text of “Get Contents of URL”.
  4. Expand the action. If the first row of the file has no column names, turn off “First Row Is Header”. For a file with tabs between the values, change “Delimiter” to “Tab”. For another character, like a semicolon, choose “Custom”, and type the character.
  5. Add “Repeat with Each” below it, and in the repeat, add “Get Dictionary Value” with the name of a column as the key, like Email.

The result, “Parsed CSV”, has one dictionary for each row. A value can have commas and line breaks in quotes, like in the CSV files of Numbers and Excel.

Tips

  • To keep only some rows, use “Filter List of Dictionaries” of Actions. To sort them by a column, use “Sort List of Dictionaries”.
  • To show the rows as a table, use “Make Markdown Table”. To make a CSV file, use “Generate CSV”.
  • A row that has no value in a column has no key for it. Turn on “Consistent Structure” to give each row all the columns.

Get Actions

Additional actions for the Shortcuts app

Download on the App Store

Free

Platforms
macOS, iOS, visionOS
Requires
macOS, iOS, or visionOS 26 or later
Category
Utilities
Released
October 2021
Updated
June 2026
Version
4.2.0
Size
29 MB
US App Store rating
4.8/5 (533 ratings)

More about Actions

Without an app

The Shortcuts app can split the text of a simple CSV file:

  1. Add “Split Text”, and split the CSV text by “New Lines”.
  2. Add “Repeat with Each”, and in the repeat, add a second “Split Text” with “Custom” and a comma.
  3. Use “Get Item from List” to get the value of a column by its number.

This works only when no value has a comma or a line break, as Shortcuts splits them too. You must also skip the row with the column names yourself.