Across the Stack Exchange network you may leave comments on a question or answer.

• When should comments be deleted?
• When can comments be undeleted?

Also see the FAQ articles on comment voting and flagging and comment replies.

## migrated from stackoverflow.comSep 2 '09 at 17:28

This question came from our site for professional and enthusiast programmers.

Comments are intentionally short, having maximum length of 600 characters, and a minimum length of 15 characters, not counting stripped characters (will get to this in a moment). They allow only limited markup. URLs in comments automatically become hyperlinks. Each user may post only one comment every 15 seconds.

Optionally, a comment can contain an @reply, which causes a certain user who commented or edited the post to be notified, in addition to the author.

Upon posting a comment, any extra whitespace between words will get collapsed into one space, any whitespace at the end will be stripped, and unnecessary @replies (directed at the post author, where the post author has not commented, and which are at the beginning) will be removed. If the length of your comment after this processing is less than 15 characters, you will get an error message and your comment will not be submitted. (Note: the character indicator below the comment field does not take into account stripped characters, so you may get an error that your processed comment isn't long enough even when the counter says it is.)

Comments are disposable: unlike posts, there's no public revision history, and they can be deleted without warning by their authors, by moderators, and in response to flags.

All users may comment on their own posts and any answers to their own questions. Users with at least 50 reputation may comment on any post (that is not locked). (On Meta Stack Exchange, it is enough to have 5 or more reputation to comment; elsewhere, including all per-site metas, the minimum is 50 reputation.)

If you can't comment on one of your own posts because you don't have 50 reputation, please ensure that you're signed into the same account as the one that made the post; file an account merge request if necessary by filling out the form found on the contact page in the footer on any site.

Users may edit their own comments any number of times for five minutes after they are first posted. Edited comments are marked with a little pencil icon, and a mouseover tooltip over that icon will provide a count of how many times the comment was edited, like this:

Moderators can edit any comment at any time. Moderator comment edits are logged and visible to other moderators. Such edits will also show the pencil icon.

In all other situations, comments cannot be edited. However, in lieu of editing, they may be deleted and resubmitted.

Moderators can also see the edit history of any comment, regardless of who edited, it by clicking on the pencil icon on the comment - provided the comment was added after October 2012.

Comments can be formatted with a subset of Markdown: bold (**bold**), italic (_italic_ or *italic*), bold italic (***bold italic*** or ___bold italic___) and code (code) are allowed. It is not generally possible to insert line breaks in comments, though some hacky workarounds exist.

URLs will be automatically converted into actual links. Links are also allowed by using the Markdown syntax [link text](https://myurl), and there are certain "magic links" that will be converted to real links automatically.

Spaces are not allowed in the comments URLs (even markdown), for example this: [URL](https://google.com/?q=stack overflow) will not generate a link. It needs to be encoded like this: [URL](https://google.com/?q=stack%20overflow).

A user may delete one of their own comments at any time by clicking on the "Delete" button that appears to the right of the comment's timestamp when the comment is moused over.

Comments that are flagged by multiple users are deleted automatically. The number of flags needed is usually based on the comment's score. It currently takes "3 + (Score / 3)" flags (rounded up) to delete a comment. Comments containing certain keywords can be deleted with a single flag.

Moderators can delete any comment, or purge all comments from a post. They also have the ability to move all of a post's comments to chat.

## When should comments be deleted?

Comments are temporary "Post-It" notes left on a question or answer. You should not expect them to be around forever. Once a clarification has been made, an edit added to the post to include new information, or the issue in the comment is otherwise resolved, it is subject to deletion. In reality, many obsolete or chatty comments remain untouched due to the high volume of comments posted, but this does not mean that they can't or shouldn't be deleted in the future.

## When can comments be undeleted?

Only moderators can undelete comments, and they can only do so with comments that were deleted by a current moderator. This includes comments deleted by someone who later becomes a moderator but was not a moderator at the time of deletion. So, comments a non-moderator user deletes themselves cannot be undeleted, neither can comments deleted through users flagging with no moderator involvement, neither can comments deleted by moderators who later lose their moderator privileges.

In several cases, the system will automatically add comments to posts on your behalf. You still own the comment, and it will appear the same as if you had manually posted the comment. You may delete the comment if you desire, but this is discouraged as it is helpful to the original poster: the automatic comments provide information on how to improve the post or why it is not appropriate. (Note that automatic comments can also be generated on behalf of users who don't have enough reputation to comment; these users cannot edit those comments.)

• When someone flags or votes to close a question as a duplicate, the system automatically posts a comment to that question which reads "Possible duplicate of -link-", as long as no such link has already been posted in a comment. The comment will be automatically deleted if the question is closed as a duplicate. The comment will be automatically upvoted whenever someone else votes to close as duplicate with the same question link.

• If you do not have enough reputation to comment, you can still flag to close as duplicate, and it will still post an automatic comment, but you cannot edit it. In the past, users without commenting privileges could not flag to close as duplicate unless they had enough reputation to comment.
• When voting (not flagging) to close a question, the user can choose "off-topic" and choose "other", adding a custom reason. When doing that, a comment will be added on their behalf with the exact text they wrote, usually something like "I'm voting to close this question as off-topic because [custom text here]". That user can delete or edit the comment within 5 minutes as any comment they posted, the comment will be shown as an available "off-topic" close reason for others voting to close, and the comment will be automatically upvoted if someone else votes to close and chooses that option.

• When choosing the "Recommend Deletion" action in the Low Quality Posts review queue, an automatic comment will be added to the actioned post, unless the user selects the "no comment necessary" option. If the selected automatic comment is already present on the post, the existing comment will receive an upvote and a duplicate comment will not be added.

• If you post an answer that is very short and consists of an internal link to anywhere on the Stack Exchange network, it will be considered a "trivial answer" and will be automatically posted as a comment instead.

• If a user is prompted by the system to continue an extended conversation in chat (see below) and chooses to do so, an automatic comment will be posted with a link to the relevant chat room.

• When a moderator moves a post's comments to chat, an automatic comment will be posted with a link to the chat room.