↓ Skip to main content

Source: https://developers.google.com/style/commas-serial ↗\n\n# Commas

  Stay organized with collections



  Save and categorize content based on your preferences.\n\n- Home\n- Products\n- Style\n\n\n## Page Summary\n\n- Use the serial (or Oxford) comma in a list of three or more items to avoid ambiguity.\n- Place a comma after introductory words and phrases, and between independent clauses joined by a coordinating conjunction.\n- Use a comma before which in nonrestrictive clauses and after conjunctive adverbs like however or therefore.\n- Generally avoid a comma before because unless it starts a nonrestrictive clause.\n- Refer to specific sections for guidance on punctuating numbers and examples.\n\nUse the serial (or Oxford) comma in a list of three or more items to avoid ambiguity.\n\nPlace a comma after introductory words and phrases, and between independent clauses joined by a coordinating conjunction.\n\nUse a comma before which in nonrestrictive clauses and after conjunctive adverbs like however or therefore.\n\nGenerally avoid a comma before because unless it starts a nonrestrictive clause.\n\nRefer to specific sections for guidance on punctuating numbers and examples.\n\nUse commas to separate items in a series, and use commas to separate certain kinds of

clauses.

Serial commas In a series of three or more items, use a comma before the final and or or to avoid potentially changing the meaning of the sentence. This comma is called a serial comma or an Oxford comma. Recommended: Locations are divided into zones, regions, and multi-regions. Not recommended: Locations are divided into zones, regions and multi-regions.

Commas after introductory words and phrases In general, place a comma after an introductory word or phrase. Recommended: Finally, only groups that contain parameters appear in this list. Recommended: Based on the requirements of your game, you can implement this method to update game information.

Commas separating two independent clauses When a coordinating conjunction (and, but, or, nor, for, so, or yet) separates two independent clauses, insert a comma after the first clause (before the conjunction) unless both clauses are very short. Recommended: The libraries make feed creation easier, and they ensure that only valid feeds are produced. Not recommended: The libraries make feed creation easier and they ensure that only valid feeds are produced. Recommended: Type your ID and click OK. Not recommended: Type your ID, and click OK.

Commas separating independent from dependent clauses When an independent clause and a dependent clause are separated by a coordinating conjunction, insert a comma only if the sentence could be misunderstood without one. Recommended: Direct-access flags are plain variables and can be read directly. Not recommended: Direct-access flags are plain variables, and can be read directly. Recommended: The manager acknowledged the last team member who entered the room, and started the meeting. Not recommended: The manager acknowledged the last team member who entered the room and started the meeting.

Set off other kinds of clauses It’s often a good idea to set off certain kinds of clauses with a comma or other punctuation for clarity. A couple of specific places where commas are a good idea:

In general, put a comma before the word which at the start of a nonrestrictive clause. For more information about this topic, see this guide’s section on relative pronouns and Grammar Girl’s page on

which versus that. In general, put a semicolon or a period or a dash before a conjunctive adverb, such as otherwise, however, or therefore, and put a comma after the conjunctive adverb. In general, don’t use a comma before the causal conjunction because unless it starts a nonrestrictive clause. For more information, see the Chicago Manual of Style Q&A entry on using commas with because.

Recommended Not recommended

Name of the group, which has a maximum length of 200 characters. Name of the group which has a maximum length of 200 characters.

The variable must have a value; otherwise, the server returns an error. The variable must have a value otherwise the server returns an error.

You can use the same key name in multiple backend services and backend buckets, because each set of keys is independent of the others. You can use the same key name in multiple backend services and backend buckets because each set of keys is independent of the others.

Punctuate numbers For information about punctuating numbers, see Commas and decimal points in numbers.

Punctuate examples For information about punctuating examples, see Format examples.\n\n\n## Serial commas\n\nIn a series of three or more items, use a comma before the final and or or to avoid potentially changing the meaning of the sentence. This comma is called a serial comma or an Oxford comma.\n\nRecommended: Locations are divided into zones, regions, and multi-regions.\n\nNot recommended: Locations are divided into zones, regions and multi-regions.\n\n\n## Commas after introductory words and phrases\n\nIn general, place a comma after an introductory word or phrase.\n\nRecommended: Finally, only groups that contain parameters appear in this list.\n\nRecommended: Based on the requirements of your game, you can implement this method to update game information.\n\n\n## Commas separating two independent clauses\n\nWhen a coordinating conjunction (and, but, or, nor, for, so, or yet) separates two independent clauses, insert a comma after the first clause (before the conjunction) unless both clauses are very short.\n\nRecommended: The libraries make feed creation easier, and they ensure that only valid feeds are produced.\n\nNot recommended: The libraries make feed creation easier and they ensure that only valid feeds are produced.\n\nRecommended: Type your ID and click OK.\n\nNot recommended: Type your ID, and click OK.\n\n\n## Commas separating independent from dependent clauses\n\nWhen an independent clause and a dependent clause are separated by a coordinating conjunction, insert a comma only if the sentence could be misunderstood without one.\n\nRecommended: Direct-access flags are plain variables and can be read directly.\n\nNot recommended: Direct-access flags are plain variables, and can be read directly.\n\nRecommended: The manager acknowledged the last team member who entered the room, and started the meeting.\n\nNot recommended: The manager acknowledged the last team member who entered the room and started the meeting.\n\n\n## Set off other kinds of clauses\n\nIt’s often a good idea to set off certain kinds of clauses with a comma or other punctuation for clarity.\n\nA couple of specific places where commas are a good idea:\n\n- In general, put a comma before the word which at the start of a nonrestrictive clause. For more information about this topic, see this guide’s section on relative pronouns and Grammar Girl’s page on

which versus that.\n- In general, put a semicolon or a period or a dash before a conjunctive adverb, such as otherwise, however, or therefore, and put a comma after the conjunctive adverb.\n\nIn general, don’t use a comma before the causal conjunction because unless it starts a nonrestrictive clause. For more information, see the Chicago Manual of Style Q&A entry on using commas with because.\n\n\nRecommended | Not recommended\nName of the group, which has a maximum length of 200 characters. | Name of the group which has a maximum length of 200 characters.\nThe variable must have a value; otherwise, the server returns an error. | The variable must have a value otherwise the server returns an error.\nYou can use the same key name in multiple backend services and backend buckets, because each set of keys is independent of the others. | You can use the same key name in multiple backend services and backend buckets because each set of keys is independent of the others.\n\n\n## Punctuate numbers\n\nFor information about punctuating numbers, see Commas and decimal points in numbers.\n\n\n## Punctuate examples\n\nFor information about punctuating examples, see Format examples.\n