Let’s solve this grammar mystery right away. In most basic terms:
- You put a comma before “such as” only if it’s a part of a non-restrictive clause.
- You don’t need a comma before “such as” if it’s a part of a restrictive clause.
Now let’s untangle this grammarian knot one clause at a time
Putting the comma before “such as”:
A non-restrictive (or non-essential) clause provides additional information about a word whose meaning is already clear.
Let’s take a look at the correct use of a comma before “such as” in a sentence:
Many European countries, such as Greece, Italy, Spain, and Portugal, enjoy beautiful weather nearly all year long.
In this example, the sentence is structured correctly even if we take the whole list including “such as” out:
Many European countries enjoy beautiful weather nearly all year long.
In other words, in this sentence, “such as” is non-essential but helps to provide more information. If you’re dealing with a case like this, by all means, put the comma before the phrase.
This rule will hold true in most sentences where you give a simple list of examples.
When not to put the comma before “such as”
Don’t put the comma if “such as” is a part of a restrictive clause. A restrictive clause is an adjective clause that is essential to the meaning of a sentence because it limits the thing it refers to.
Let’s take a look at a correct example where you don’t put the comma before “such as”:
Martial arts such as Brazilian Jiu-Jitsu and Krav Maga are among my favorites.
Now, if we take out the “such as” part, we end up with:
Martial arts are among my favorites.
As you can see, the sentence doesn’t have the same meaning anymore. In cases like this, you don’t include the comma before “such as”.
Moreover, the non-comma rule will apply to most sentences where you give just a single example of something.
Mushrooms such as Amanita Muscaria are poisonous.
But again, you can see that without the “such as” part, the sentence would have a totally different meaning.
Final mystery – do you use a comma AFTER “such as”?
You don’t need a comma after “such as”.
Example: He brought many fruits, such as bananas, apples, and cherries.
I hope this explanation was clear and now you’ll know exactly where to put your commas. If you need help with grammar, you can get your prose checked automatically with Grammarly. I use it to write all of the articles for this blog. If you have other ideas about commas and such as, please let me know in the comments section below.