Which sentence is punctuated correctly?

*
I had to replace my headphones, which I bought less than a year ago.
I had to replace my headphones which I bought less than a year ago.
I had to replace my headphones which I bought, less than a year ago.
I had to replace my headphones which, I bought less than a year ago.

1 answer

The correctly punctuated sentence is:

I had to replace my headphones, which I bought less than a year ago.