Where should a period be placed when a sentence ends in a word that is meant to be copied exactly?

Contrived example: Let's say that my friend is house-sitting and I want to text them the password to my laptop. The password is password123. There is no period in the password.

Which of these has better punctuation?

The password to my laptop is "password123."

This is confusing because the password does not in fact include a period. The reader could copy it down incorrectly.


The password to my laptop is "password123".

This is (according to any source I can find) incorrect punctuation.

Is it acceptable to make an exception here and use the latter punctuation, given the intended utility of the sentence?

At the end of the day I just restructured the sentence to avoid this problem, but I am still curious if there is an official answer to this.

  • 2
    I put it on a line by itself, and then the (possibly) confusing "quotes marks" can be removed too. Sep 6, 2019 at 20:33
  • 1
    I'm with @WeatherVane - something more dramatic than quotation marks is probably necessary. How would you write a sentence that included this password "\"'abc\123." '\".?.?
    – Juhasz
    Sep 6, 2019 at 20:42
  • This is a question of style, so answers can vary and still be right. Personally, I wouldn't use quotation marks at all but would instead use a colon and italicize and/or bold the word itself such that it had a different appearance than the ensuing comma, something like, "The password to my laptop is: password 123 ." That said, I don't think anyone would think the period is part of the password. To get anyone to think that, you'd have to go and say that to make it clear, like by saying, "The password to my laptop is 'password 123.' (Period included.)" Sep 6, 2019 at 21:00
  • The password is 'password123' on my laptop. (But it had better not be). Sep 17, 2019 at 16:52

1 Answer 1


The "rules" on punctuation placement relative to quotation marks are often poorly stated. When a sentence ends with a quotation of a sentence or a relatively complete phrase, one should generally include the period (or comma, in other contexts) inside the quotes. The theory is that the phrase was at its ending anyway, so might as well give it the period.

But when the quoted text is something like a password or an acronym, or some sort of contrived product name, where the punctuation is clearly not relevant to the quoted material, the punctuation should be after the closing quote.

Consider a product that calls itself "Dot.Product". Including the period in the quotes would be quite deceptive.

Not the answer you're looking for? Browse other questions tagged or ask your own question.