Is there a comma before such as?
The answer is yes, there is, and no, there isn’t. As usual, with grammar and punctuation, it depends on the structure of a sentence.
When such as is part of a nonrestrictive clause, you need to use a comma. But if the clause is restrictive, there is no comma.
In other words, if a clause is essential to form a coherent and logical sentence, it is restrictive.
When to add a comma before such as
The word such can be a determiner, predeterminer, or a pronoun.
We use it in so many ways because it is such a versatile word.
But such is the simplicity of its use; you rarely need to worry about punctuation.
The only time you need to take care and consider a comma is with the phrase such as.
Here are two example sentences to show you the forms that need attention.
German cars such as Porsche, Mercedes, and BMW are usually very expensive.
German cars are usually expensive, such as Porsche, Mercedes, and BMW.
In the first example, the such as clause is restrictive. It means that you cannot remove it from the sentence.
However, in the second example, such as Porsche, Mercedes, and BMW can be removed, and the sentence remains complete.
You can say that the simple rule to remember for a comma before such as is that if you can remove it, you need a comma. If you can’t remove it, you don’t use a comma.
Examples of such as clauses
Here are a few more examples to help you understand the such as comma rule.
Other words such as but sometimes require a comma.
Other words sometimes require a comma, such as but.
Family pets such as dogs and cats are a big responsibility.
It’s a big responsibility to have family pets, such as dogs and cats.
Punctuation points such as commas can often cause confusion.
Punctuation points can often cause confusion, such as commas.
Generally, a nonrestrictive clause is at the end of the sentence, so it’s an easy rule to learn to use.
The only small point to keep in mind is that you can often remove a such as clause. But if doing so changes the meaning of the complete sentence, it is restrictive.
Punctuation points such as commas can often cause confusion.
If you remove the reference to commas in the example above, the sentence loses its intention of talking about commas in particular.
Split clauses
You can use such in other sentence constructions with as or that.
Here’s a common expression we all know as the first example.
There is no such thing as a free lunch.
He did it in such a way as to confuse everyone.
It was such a complicated exam that I couldn’t finish it in the allotted time.
My essay was of such importance to me that I spent all weekend writing it.
Such is the style of the Fender Stratocaster that it is still popular after nearly seventy years.
Like and for example
Very often, such as can have a similar meaning to like or, for example.
Sometimes you can replace it with like without changing the sentence structure.
Punctuation points such as like commas can often cause confusion.
Punctuation points such as like commas, for example, can often cause confusion.
Generally, though, if you use for example you need to rewrite a sentence.
German cars are usually expensive—for example, Porsche, Mercedes, and BMW.
German cars are usually expensive, including Porsche, Mercedes, and BMW, for example.
Summary
The comma before such as is such an easy grammar point to learn that you would rarely think about it.
But it’s always worth checking your sentence structure and punctuation with a good grammar checker, just to be sure.
You always have the option to change your choice of phrase if it sounds awkward or perhaps unclear for a reader.
When you use such as or, for example, it can seem a little more formal than if you use the preposition, like.
As ever, with grammar and vocabulary, you always have choices to make.
Related reading: How You Can Get Neither Nor And Either Or Correct Every Time