Automatically convert cooking recipe units

I am looking for a way to manipulate cooking recipe texts in such a way, that measurement in units foreign to me are converted to the ones I know. For example:

2 cups of milk → 568 ml of milk

Here is what I think needs to happen:

  1. Look for {Number}{Space}{Unit}{Space}.
  2. Replace foreign unit with known unit.
  3. Multiply and round number to represent appropriate value in the new unit.

I was thinking of using GREP to achieve this, but do not know how to apply GREP to, say, a note in the Notes app, or text in TextEdit. But I have an open mind as to how this might be achieved. Ideally this would be possible inside the Notes app on my iPhone however, since this is the place where I gather cooking recipes.


Here’s a shortcut I’ve made that does this: Apply Conversions.

Given input, either from

  • a note (tap the Share button in the upper-right)
  • selected text in any app (tap Share from the selection menu)
  • the current clipboard (run the shortcut from the app or the widget)

the output will be produced. See the example below:

When importing the shortcut from the link above, you will be asked to enter your conversions. These can be edited at any time by editing the shortcut.

The shortcut is as follows: