CODE
CODE

How To Use A Comma Before “Such As” (With Examples)

Last updated
21
Apr
2024
min read

If you’re writing for a professional publication, such as a blog or a print magazine, then you need to make sure your grammar is impeccable. When you submit work containing grammatical errors, consequences such as increased editing time or your published work looking unprofessional can ensue.

One common grammar mistake is incorrectly using commas around the common phrase “such as.” This mistake is understandable, because “such as” sometimes needs a comma and sometimes doesn’t. For example, look at the two uses of the phrase in the above paragraph—one is correctly using commas, and one is correct without them.

In fact, there’s a simple trick to knowing how and when to use commas with “such as.” Once you’ve learned this, you shouldn’t make the mistake again.

When to use a comma with “Such As”

Here’s the trick: write out your sentence, including the “such as” phrase. Then, try removing the part of the sentence that starts with “such as.” Ask yourself if the meaning of the sentence has changed.

If the answer is no, then the “such as” phrase is a nonrestrictive clause, i.e., a phrase that is not essential to the sentence, and so it does need to be separated by commas.

{{writer}}

Let’s look at two sentences with such nonrestrictive clauses. For example:

The garden is filled with flowers, such as tulips and daffodils.

In this case, if we remove the phrase “such as tulips and daffodils,” then the sentence we’re left with is “The garden is filled with flowers.” This makes perfect sense on its own. Specifying the types of flowers is an additional explanatory detail, not an essential clause, so it should be preceded by a comma.

Where the “such as” phrase comes in the middle of a sentence, commas should be used on either side. For example:

All mammals, such as dogs and cats, are warm-blooded.

With the “such as” phrase removed, the sentence “All mammals are warm-blooded” retains the same meaning. “Such as dogs and cats” is a nonessential detail, and so it is separated from the rest of the sentence by commas.

When not to use a comma with “Such As”

Now try the same trick again: write out your sentence, remove the “such as” phrase, and ask yourself if the meaning of the sentence has changed.

When the answer is yes, then the “such as” phrase is a restrictive clause, i.e., one that is essential to the sentence. In these cases, there is no need for commas.

Here’s an example of a sentence with a restrictive clause using “such as”:

Countries such as Mali and Senegal have hot climates.

Here, if we remove the phrase “such as Mali and Senegal,” then we’re left with the sentence “Countries have hot climates.” This implies that all countries have hot climates, which, as those of us who live in the United Kingdom will happily tell you, is demonstrably not true. Therefore, this is an essential phrase, and we do not have to use commas around it.

Ambiguous cases

Sometimes, you will encounter a sentence that could make grammatical sense with or without a comma—but in this case, you have to be especially careful about how the comma affects the meaning. Look at this example:

I like animals such as cats and dogs.

I like animals, such as cats and dogs.

Neither of these sentences necessarily contain grammatical errors. However, the comma changes the meaning.

Without the comma, the author is saying that they specifically like cats, dogs, and perhaps some similar animals, but there may be other animals that they do not like. With the comma, the author is saying that they like all animals, then giving cats and dogs as examples.

More Examples

Here are some sentences which correctly use—or don’t use—commas before “such as.” Think about whether the clauses are restrictive or nonrestrictive and how this has informed the comma usage. How would the meaning be different or incorrect if the comma usage were swapped?

Fruits, such as lemons and bananas, can contribute to a balanced diet.

Fruits such as lemons and bananas are yellow.

I enjoy lots of foods, such as ice cream and cake.

Foods such as ice cream and cake are full of sugar.

Many writers struggle with problems such as getting the hang of commas.

Many writers, such as this bestselling novelist, struggle with grammar.

Summary

Whether or not you need a comma before “such as” depends on whether it’s part of a restrictive clause or a nonrestrictive clause, or to put it simply, whether it’s an essential or nonessential part of the sentence.

To know whether to use a comma before "such as":

  1. Remove "such as" from your sentence
  2. Ask yourself if the sentence still has the same meaning
  3. If it does, it needs a comma. If it doesn't, it does not need a comma.

Once you’ve got the hang of this trick, you should have no trouble knowing when to use a comma with “such as”.

Are you a content writer?

Receive insider tips straight to your inbox.

Thank you! We’ll let you know when we’re ready to launch.
Oops! Something went wrong while submitting the form.
Are you a publisher?

Receive insider tips straight to your inbox.

Thank you! We’ll let you know when we’re ready to launch.
Oops! Something went wrong while submitting the form.

Would you like to speak to one of our experts?

Create custom email campaigns, measure performance, and turn insights into results with Mailchimp’s email marketing tools.

Book a meeting