What Is a Semicolon Used For? Rules, Uses, and Examples
A semicolon (;) is used to connect two closely related independent clauses or to separate items in a complex list when those items already contain commas. It creates a stronger break than a comma but a closer connection than a period.
Example:
I wanted to leave early; the meeting ran longer than expected.
Both parts are complete sentences, and the semicolon shows that they are closely related.
A semicolon has two main uses: connecting related complete thoughts and separating complicated list items. Understanding these rules helps you avoid comma splices, sentence fragments, and unnecessary punctuation.
Quick Answer: What Is a Semicolon Used For?
Use a semicolon in two main situations.
1. To connect two closely related independent clauses.
The store was closed; we ordered dinner online.
Both sides can stand alone as complete sentences.
2. To separate items in a complex list.
We visited Austin, Texas; Denver, Colorado; and Portland, Oregon.
Each place name includes a comma, so semicolons make the boundaries between list items easier to see.
A semicolon should not separate a complete sentence from a dependent clause or sentence fragment. It also does not replace commas in ordinary lists.
What Is a Semicolon? Understanding the Basic Rule
A semicolon is a punctuation mark that connects related grammatical units without separating them as completely as periods do.
The most important rule is that a semicolon used to connect two sentences must have an independent clause on each side.
An independent clause contains a subject and a verb and expresses a complete thought.
Example:
The deadline is tomorrow; we should finish tonight.
The sentence contains two independent clauses:
- The deadline is tomorrow.
- We should finish tonight.
Because both clauses can stand alone and their meanings are connected, a semicolon works well.
Compare that with this sentence:
Incorrect: I stayed home; because I felt sick.
The words because I felt sick form a dependent clause, not an independent sentence.
Correct: I stayed home because I felt sick.
A semicolon is not a general-purpose replacement for a comma. Its use depends on sentence structure and the relationship between the ideas.
When to Use a Semicolon
1. To Connect Two Closely Related Complete Sentences
Use a semicolon when two independent clauses express ideas that are closely connected.
Examples:
- The weather changed quickly; we canceled the picnic.
- My laptop stopped working; I borrowed my sister’s computer.
- The road was icy; driving was dangerous.
- She practiced every day; her confidence improved.
- The deadline moved up; everyone stayed late.
In each example, the two clauses could be separate sentences. The semicolon emphasizes their relationship.
You can use a period instead, but it creates a more distinct separation.
With a semicolon:
The weather changed quickly; we canceled the picnic.
With a period:
The weather changed quickly. We canceled the picnic.
Both versions are grammatically correct. Choose the semicolon when you want readers to recognize the close connection between the ideas.
2. Before a Conjunctive Adverb or Transitional Phrase
Use a semicolon before a conjunctive adverb or transitional phrase when it connects two independent clauses. A comma generally follows the transition.
Common examples include:
- However
- Therefore
- Nevertheless
- Consequently
- Meanwhile
- As a result
- For example
- For instance
Examples:
I studied all week; however, the test was still difficult.
The file was too large; therefore, I uploaded it to a shared folder.
The first plan failed; as a result, we tried a simpler approach.
The rule seems simple; nevertheless, many writers misuse it.
In these sentences, the semicolon separates the independent clauses, while the comma sets off the transition.
Incorrect: I studied all week, however, the test was still difficult.
Correct: I studied all week; however, the test was still difficult.
The incorrect version joins two independent clauses with commas alone, creating a comma splice.
You can also write the ideas as separate sentences:
I studied all week. However, the test was still difficult.
Use a semicolon when the relationship between the two thoughts is strong enough to keep them together.
3. To Separate Items in a Complex List
Use semicolons when individual list items already contain commas and ordinary commas would make the list difficult to read.
Simple list:
We bought apples, bread, and milk.
Complex list:
We invited Ben, my cousin; Lena, my neighbor; and Omar, my coworker.
The semicolons separate the three people, while the commas identify each person’s relationship to the speaker.
More examples:
- The finalists were Maya Lopez, first place; Jordan Kim, second place; and Ava Reed, third place.
- The conference included sessions in Boston, Massachusetts; Phoenix, Arizona; and Portland, Oregon.
- Please contact Dana, the project manager; Luis, the designer; and Priya, the editor.
Without semicolons, the commas within each item can make the list confusing.
Less clear:
The speakers were Anna Torres, a journalist, Mark Lee, a professor, and Nina Patel, a researcher.
Clearer:
The speakers were Anna Torres, a journalist; Mark Lee, a professor; and Nina Patel, a researcher.
The semicolons help readers identify where one item ends and the next begins.
4. To Connect Ideas That Explain or Contrast With Each Other
A semicolon can connect independent clauses when the second clause explains, contrasts with, or develops the first.
Explanation:
The schedule is full; we need to start early.
Contrast:
I wanted to stay longer; my ride was already outside.
Related outcome:
The team missed the deadline; the launch was postponed.
The ideas do not need to express a strict cause-and-effect relationship. They should, however, have a clear connection.
Weak connection:
The meeting ended early; my neighbor bought a new bicycle.
Both sides are complete sentences, but their relationship is unclear.
Better:
The meeting ended early. My neighbor bought a new bicycle.
A period is more appropriate when the ideas are unrelated or are better presented separately.
Semicolon vs. Comma, Colon, and Period
A semicolon has a different purpose from the other common punctuation marks. Choosing the correct one depends on how the sentence is structured and how the ideas relate.
| Punctuation Mark | Main Use | Example |
|---|---|---|
| Comma (,) | Separates items or parts of a sentence | We packed snacks, water, and jackets. |
| Semicolon (;) | Connects related independent clauses or separates complex list items | The trail was closed; we chose another route. |
| Colon (:) | Introduces a list, explanation, or elaboration | Bring three things: snacks, water, and jackets. |
| Period (.) | Ends a sentence | The trail was closed. We chose another route. |
Semicolon vs. Comma
A comma is generally not strong enough to join two independent clauses by itself.
Incorrect: The trail was closed, we chose another route.
Correct: The trail was closed; we chose another route.
You can also use a comma with a coordinating conjunction such as so:
The trail was closed, so we chose another route.
Use a semicolon when you want to connect the complete thoughts without a coordinating conjunction.
Semicolon vs. Colon
A semicolon connects related independent clauses or separates complex list items. A colon introduces information that explains, illustrates, or expands on what comes before it.
Semicolon:
The answer was clear; we needed more time.
Colon:
We needed one thing: more time.
In the colon example, the second part identifies what was needed.
A colon should generally follow a complete clause when introducing a list or explanation.
Semicolon vs. Period
Both a semicolon and a period can separate two independent clauses.
Semicolon:
The road was icy; driving was dangerous.
Period:
The road was icy. Driving was dangerous.
The semicolon emphasizes the relationship between the two ideas. The period separates them into distinct sentences.
Neither option is automatically better. Choose the punctuation that best suits the meaning and flow of the writing.
When Not to Use a Semicolon
1. Between a Complete Sentence and a Fragment
Do not use a semicolon when one side cannot stand alone as a sentence.
Incorrect: I packed my bag; before school.
Correct: I packed my bag before school.
The phrase before school is not an independent clause.
2. Before a Dependent Clause
Words such as because, although, while, and if can introduce dependent clauses. These clauses generally cannot stand alone as complete sentences.
Incorrect: I stayed home; because I felt sick.
Correct: I stayed home because I felt sick.
You can sometimes use a semicolon before a dependent clause when it belongs to a larger sentence structure, but not simply to join a complete sentence to an isolated dependent clause.
3. Before a Simple List
Do not use semicolons to separate ordinary list items that do not contain internal commas.
Incorrect: I bought apples; bread; and milk.
Correct: I bought apples, bread, and milk.
Use commas for simple lists. Reserve semicolons for complex lists in which the items themselves contain commas or need stronger separation.
4. Between Unrelated Ideas
A semicolon should show a meaningful relationship between the clauses it connects.
Weak: I finished the report; my shoes are by the door.
Better: I finished the report. My shoes are by the door.
The period makes sense because the ideas are unrelated.
5. Before Every Transition Word
Not every sentence containing however, therefore, or for example needs a semicolon.
Correct with a semicolon:
The report was incomplete; therefore, we postponed the meeting.
Correct with a period:
The report was incomplete. Therefore, we postponed the meeting.
Incorrect:
The report was incomplete; therefore, the meeting.
The final example is incorrect because the meeting is a fragment, not an independent clause.
The punctuation must fit the entire sentence, not just the transition word.
Common Semicolon Mistakes
Mistake 1: Using a Comma Instead of a Semicolon
Incorrect: The movie was sold out, we watched another one.
Correct: The movie was sold out; we watched another one.
The incorrect sentence contains a comma splice: two independent clauses joined by a comma without a coordinating conjunction.
You could also write:
The movie was sold out, so we watched another one.
Mistake 2: Using a Semicolon Before a Dependent Clause
Incorrect: She opened the window; after the room got warm.
Correct: She opened the window after the room got warm.
The phrase after the room got warm depends on the main clause and does not function as an independent sentence.
Mistake 3: Capitalizing the Word After a Semicolon
In ordinary English writing, the word following a semicolon does not normally begin with a capital letter unless capitalization is required for another reason.
Incorrect: The bus was late; We took a cab.
Correct: The bus was late; we took a cab.
However, proper nouns retain their capitalization.
Correct: We arrived late; Chicago traffic was unusually heavy.
Chicago is capitalized because it is a proper noun, not because it follows a semicolon.
Mistake 4: Using a Semicolon in a Simple List
Incorrect: We need pens; paper; and folders.
Correct: We need pens, paper, and folders.
The items are simple and do not contain internal commas, so ordinary commas are appropriate.
Mistake 5: Using Semicolons Too Frequently
Semicolons can make writing precise, but using them in every sentence can make the text feel unnecessarily complicated.
Overwritten:
The store was busy; the checkout lines were long; the staff needed help.
Clearer:
The store was busy, and the checkout lines were long. The staff needed help.
Use semicolons when they improve the connection between ideas or make a complex list easier to understand. Do not use them merely to make writing sound formal.
Correct Semicolon Examples
| Example | Why It Works |
|---|---|
| The rain stopped; the game continued. | Connects two related independent clauses. |
| I called twice; no one answered. | Both sides are complete thoughts. |
| She practiced daily; as a result, she improved. | Uses a transition between independent clauses. |
| We visited Tampa, Florida; Boise, Idaho; and Reno, Nevada. | Separates list items containing commas. |
| The deadline moved up; everyone stayed late. | Connects related events. |
| The plan was risky; however, it worked. | Places a semicolon before a conjunctive adverb. |
| The recipe looked simple; however, it took two hours. | Connects two complete clauses. |
| He wanted to apologize; she was not ready to talk. | Connects contrasting situations. |
| The email was unclear; I asked for more details. | Connects related actions. |
| The first draft was messy; the final version was polished. | Contrasts two related descriptions. |
An Easy Way to Remember Semicolon Rules
Before using a semicolon between two thoughts, ask yourself two questions:
- Can both sides stand alone as complete sentences?
- Are the two ideas closely related?
If both answers are yes, a semicolon may be appropriate.
Example:
The lights went out; we found the flashlights.
Both clauses are complete, and the second describes a response to the first.
For lists, ask a different question: Do the individual items already contain commas?
If they do, semicolons may make the list easier to read.
Example:
We invited Ben, my cousin; Lena, my neighbor; and Omar, my coworker.
This quick test helps distinguish the two main uses of a semicolon.
FAQs
What Is a Semicolon Used for in Simple Words?
A semicolon connects two closely related complete sentences or separates items in a complex list that already contains commas.
Example:
I was tired; I finished the project anyway.
Both sides are complete thoughts, and the semicolon connects them.
What Is an Example of a Semicolon?
Here is a straightforward example:
I finished my homework; my brother was still studying.
Both parts can stand alone as sentences. The semicolon emphasizes their relationship.
Can a Semicolon Replace a Period?
Yes. A semicolon can replace a period when two independent clauses are closely related.
Period: The road was icy. Driving was dangerous.
Semicolon: The road was icy; driving was dangerous.
Both versions are grammatically correct, but the semicolon creates a closer connection.
Can a Semicolon Replace a Comma?
Sometimes. A semicolon can separate complex list items that already contain commas, but it cannot replace every comma.
Correct:
We invited Ben, my cousin; Lena, my neighbor; and Omar, my coworker.
Incorrect:
I bought apples; bread; and milk.
Correct:
I bought apples, bread, and milk.
Use commas for ordinary lists and semicolons when the structure of a complex list requires clearer separation.
Do You Capitalize After a Semicolon?
Usually, no. The next word begins with a lowercase letter unless another rule requires capitalization, such as when the word is a proper noun.
Correct:
The class ended early; the students went home.
Correct:
We missed our flight; Denver was covered in snow.
Can You Use a Semicolon With However?
Yes. When however connects two independent clauses, place a semicolon before it and a comma after it.
Correct:
I wanted to go; however, I had too much work.
You can also start a new sentence:
I wanted to go. However, I had too much work.
What Is the Difference Between a Semicolon and a Colon?
A semicolon connects related independent clauses or separates complex list items. A colon introduces a list, explanation, example, or elaboration.
Semicolon: The answer was clear; we needed more time.
Colon: We needed one thing: more time.
Is a Semicolon Only for Formal Writing?
No. Semicolons are used in academic writing, business documents, articles, emails, and other types of writing. They can improve clarity whenever two complete thoughts are closely related.
However, simpler sentence structures are often preferable when a semicolon adds no value.
Can You Use a Semicolon Before And or But?
Yes, in certain constructions, particularly when the clauses are long or contain internal commas. However, a semicolon before and or but is not the usual choice in a simple compound sentence.
Standard:
The first team, which arrived early, set up the room, and the second team handled registration.
A semicolon may improve clarity in a more complex construction:
The first team, which arrived early, set up the room; the second team, which arrived later, handled registration.
In the second example, the semicolon separates two independent clauses. It is not necessary to place and or but after it.
What Is the Easiest Way to Check Whether a Semicolon Is Correct?
Replace the semicolon with a period. If both sides work as complete sentences and the ideas are closely related, the semicolon may be correct.
Example:
The lights went out; we found the flashlights.
Test:
The lights went out. We found the flashlights.
Both sentences work independently, so the semicolon is grammatically possible.
Remember that this test applies to semicolons connecting clauses, not semicolons separating items in a complex list.
Conclusion
A semicolon has two primary uses: connecting closely related independent clauses and separating complex list items that already contain commas.
Use a semicolon between complete thoughts when it strengthens their connection. Use it in complicated lists when ordinary commas make the items difficult to distinguish. Avoid using it between a complete sentence and a fragment, in simple lists, or merely to make writing sound formal.
The essential rule is simple: use a semicolon when the sentence structure supports it and the punctuation makes the meaning clearer.
A semicolon is used to connect closely related complete thoughts or to separate items in a complex list.
It is stronger than a comma but less final than a period. Used well, it helps show that two ideas belong together without making them separate sentences.
Example:
- I wanted to leave early; the meeting ran longer than expected.
Both sides could stand alone as sentences. The semicolon shows that the ideas are connected.
Quick Answer
A semicolon has two main uses.
First, it connects two closely related independent clauses.
- The store was closed; we ordered dinner online.
Second, it separates items in a list when the items already contain commas.
- We visited Austin, Texas; Denver, Colorado; and Portland, Oregon.
A semicolon should not be used like a regular comma. It should not appear before a simple list or between a complete sentence and a fragment.
The Rule Explained
The most important semicolon rule is simple: use a semicolon between two complete thoughts that are closely related.
A complete thought is also called an independent clause. It has a subject and a verb, and it can stand alone as a sentence.
Example:
- The deadline is tomorrow; we should finish tonight.
First complete thought:
- The deadline is tomorrow.
Second complete thought:
- We should finish tonight.
The semicolon works because both parts are complete sentences. It also works because the second sentence explains why the first sentence matters.
A semicolon does not need a coordinating conjunction such as and, but, or, or so.
Correct:
- The printer stopped working; I sent the file by email.
Also correct:
- The printer stopped working, so I sent the file by email.
Both versions are grammatical. The semicolon version connects the thoughts without adding a conjunction.
When To Use It
Use a semicolon when two complete thoughts are closely connected.
Correct:
- The weather changed quickly; we canceled the picnic.
- My laptop died; I forgot the charger at home.
- The road was icy; driving was dangerous.
- She practiced every day; her confidence improved.
In each sentence, both sides can stand alone. The semicolon shows a close relationship between them.
Use a semicolon when the second thought explains, contrasts with, or follows from the first.
Explanation:
- The schedule is full; we need to start early.
Contrast:
- I wanted to stay longer; my ride was already outside.
Result:
- The team missed the deadline; the launch moved to Friday.
The two ideas should feel naturally connected. If they are unrelated, use a period and start a new sentence.
Unclear:
- The meeting ended early; my neighbor bought a new bike.
Better:
- The meeting ended early. My neighbor bought a new bike.
The semicolon is not wrong because of grammar alone. It is weak because the ideas do not clearly belong together.
Semicolons With Transition Words
Use a semicolon before a transition word when the transition connects two complete thoughts.
Common transition words and phrases include:
- however
- therefore
- nevertheless
- meanwhile
- for example
- for instance
- as a result
- consequently
Correct:
- I studied all week; however, the test was still difficult.
- The file was too large; therefore, I uploaded it to a shared folder.
- The first plan failed; as a result, we tried a simpler approach.
- The rule sounds simple; nevertheless, many writers misuse it.
The semicolon comes before the transition word. A comma usually follows the transition word or phrase.
Incorrect:
- I studied all week, however, the test was still difficult.
Correct:
- I studied all week; however, the test was still difficult.
You can also use a period instead.
Correct:
- I studied all week. However, the test was still difficult.
The semicolon keeps the two thoughts closer together. The period creates a stronger break.
Semicolons In Complex Lists
Use semicolons to separate list items when the items already contain commas.
Simple list:
- We bought apples, bread, and milk.
Complex list:
- We invited Ben, my cousin; Lena, my neighbor; and Omar, my coworker.
The semicolons make the list easier to read because each item already has a comma.
More examples:
- The finalists were Maya Lopez, first place; Jordan Kim, second place; and Ava Reed, third place.
- The conference has sessions in Boston, Massachusetts; Phoenix, Arizona; and Portland, Oregon.
- Please email the report to Dana, the project manager; Luis, the designer; and Priya, the editor.
Without semicolons, these lists can become crowded and confusing.
Crowded:
- The speakers were Anna Torres, a journalist, Mark Lee, a professor, and Nina Patel, a researcher.
Clear:
- The speakers were Anna Torres, a journalist; Mark Lee, a professor; and Nina Patel, a researcher.
Semicolons help readers see where one list item ends and the next begins.
Semicolon Vs. Comma, Colon, And Period
A semicolon is not just a fancy comma. It has a different job.
| Punctuation Mark | Main Use | Example |
|---|---|---|
| Comma | Separates smaller parts of a sentence | We packed snacks, water, and jackets. |
| Semicolon | Connects related complete thoughts | The trail was closed; we chose another route. |
| Colon | Introduces a list, explanation, or example | Bring three things: snacks, water, and jackets. |
| Period | Ends a complete thought | The trail was closed. We chose another route. |
Use a comma with a coordinating conjunction when you want a smoother, more common compound sentence.
Correct:
- The trail was closed, so we chose another route.
Use a semicolon when both thoughts are complete and closely related.
Correct:
- The trail was closed; we chose another route.
Use a colon when the second part explains, introduces, or expands the first part more directly.
Correct:
- We chose another route for one reason: the trail was closed.
Use a period when the ideas should stand separately.
Correct:
- The trail was closed. We chose another route.
When Not To Use It
Do not use a semicolon between a complete sentence and a fragment.
Incorrect:
- I packed my bag; before school.
Correct:
- I packed my bag before school.
The words before school cannot stand alone as a sentence.
Do not use a semicolon before a simple list.
Incorrect:
- I bought; apples, milk, and bread.
Correct:
- I bought apples, milk, and bread.
Use a colon if a complete sentence introduces a list.
Correct:
- I bought three things: apples, milk, and bread.
Do not use a semicolon after because, although, while, if, or similar dependent words.
Incorrect:
- I stayed home; because I felt sick.
Correct:
- I stayed home because I felt sick.
Do not place a semicolon before every transition word. Use it only when the transition connects two complete thoughts.
Incorrect:
- The meeting was short; for example, the budget update.
Correct:
- The meeting was short; for example, the budget update took only five minutes.
Common Mistakes
One common mistake is using a comma between two complete thoughts.
Incorrect:
- The movie was sold out, we watched another one.
Correct:
- The movie was sold out; we watched another one.
This error is called a comma splice.
Another mistake is using a semicolon when the second part cannot stand alone.
Incorrect:
- She opened the window; after the room got warm.
Correct:
- She opened the window after the room got warm.
A third mistake is capitalizing the first word after a semicolon.
Incorrect:
- The bus was late; We took a cab.
Correct:
- The bus was late; we took a cab.
Do not capitalize after a semicolon unless the next word is a proper noun.
Correct:
- We arrived late; Chicago traffic was heavy.
Chicago stays capitalized because it is a proper noun.
Another mistake is using a semicolon between unrelated ideas.
Weak:
- I finished the report; my shoes are by the door.
Better:
- I finished the report. My shoes are by the door.
A semicolon should connect ideas that have a clear relationship.
Correct Examples
| Sentence | Why It Works |
|---|---|
| The rain stopped; the game continued. | Both sides are complete thoughts. |
| I called twice; no one answered. | The ideas are closely connected. |
| She practiced daily; as a result, she improved. | A transition phrase connects two complete thoughts. |
| We visited Tampa, Florida; Boise, Idaho; and Reno, Nevada. | The list items contain commas. |
| The deadline moved up; everyone stayed late. | The second thought follows from the first. |
| The plan was risky; however, it worked. | However connects two independent clauses. |
More correct examples:
- The recipe looked simple; however, it took two hours.
- He wanted to apologize; she was not ready to talk.
- The alarm rang; everyone left the building.
- The email was unclear; I asked for more details.
- The guests came from Dallas, Texas; Phoenix, Arizona; and Madison, Wisconsin.
- The first draft was messy; the final version was strong.
Quick Memory Fix Or Rule Of Thumb
Use this simple rule:
A semicolon connects two complete thoughts or clears up a crowded list.
Before using a semicolon, ask two questions:
- Can both sides stand alone as sentences?
- Are the ideas closely related?
If the answer to both questions is yes, a semicolon may work.
For lists, ask one question:
- Do the list items already contain commas?
If yes, semicolons can make the list clearer.
FAQs
What is a semicolon used for in simple words?
A semicolon connects two complete thoughts that are closely related.
It can also separate long or complex list items that already contain commas.
Example:
- I was tired; I finished the project anyway.
Both parts could be separate sentences.
What is an example of a semicolon?
Here is a simple example:
- I finished my homework; my brother was still studying.
Both parts are complete thoughts. The semicolon shows that the two ideas are connected.
Can a semicolon replace a period?
Yes, sometimes. A semicolon can replace a period when two complete sentences are closely related.
Period:
- The road was icy. Driving was dangerous.
Semicolon:
- The road was icy; driving was dangerous.
The semicolon creates a closer connection between the ideas.
Can a semicolon replace a comma?
Sometimes, but not always.
A semicolon can replace a comma in a complex list when the items already contain commas.
Correct:
- We invited Ben, my cousin; Lena, my neighbor; and Omar, my coworker.
A semicolon should not replace a comma in a simple list.
Incorrect:
- I bought apples; bread; and milk.
Correct:
- I bought apples, bread, and milk.
Do you capitalize after a semicolon?
Usually, no.
Correct:
- The class ended early; the students went home.
Capitalize after a semicolon only if the next word is a proper noun.
Correct:
- We missed our flight; Denver was covered in snow.
Can I use a semicolon with “however”?
Yes. Use a semicolon before however when it connects two complete thoughts.
Correct:
- I wanted to go; however, I had too much work.
A comma usually follows however.
What is the difference between a semicolon and a colon?
A semicolon connects related complete thoughts or separates complex list items.
A colon usually introduces a list, explanation, example, or expansion.
Semicolon:
- The answer was clear; we needed more time.
Colon:
- We needed one thing: more time.
Is a semicolon formal?
A semicolon can sound polished, but it is not only for formal writing.
It works in essays, reports, emails, and other writing when it makes the sentence clearer. Still, simple sentences are often better when a semicolon is not needed.
Can I use a semicolon before “and” or “but”?
Yes, but only in limited cases.
A semicolon can appear before and or but when the clauses are long or already contain commas.
Example:
- The first team, which arrived early, set up the room; and the second team, which came later, handled registration.
In most everyday sentences, a comma is enough before and or but.
What is the easiest way to check a semicolon?
Replace the semicolon with a period.
If both sides still make complete sentences, the semicolon may be correct.
Example:
- The lights went out; we found the flashlights.
Test:
- The lights went out. We found the flashlights.
Both sentences work, so the semicolon is possible.
Conclusion
A semicolon has two primary uses: connecting closely related independent clauses and separating complex list items that already contain commas.
Use a semicolon between complete thoughts when it strengthens their connection. Use it in complicated lists when ordinary commas make the items difficult to distinguish. Avoid using it between a complete sentence and a fragment, in simple lists, or merely to make writing sound formal.
The essential rule is simple: use a semicolon when the sentence structure supports it and the punctuation makes the meaning clearer.