Unable to add code snippet to chat in Teams

Anonymous
2025-07-09T06:40:36+00:00

Hi,

The option to add a code snippet seems to have been removed. It used to be available from the top toolbar.

I can still add text formatted as code, and code blocks.

Teams version from settings: 25153.1010.3727.5483.

Microsoft Teams | Microsoft Teams for business | Chats | Group chats

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} vote

7 answers

Sort by: Most helpful
  1. Anonymous
    2025-07-09T10:04:04+00:00

    Dear Sam,

    Good day! Thank you for posting on Microsoft Community. I am happy to help you!

    I apologize for the experience you have had with this issue.

    To assist you better, could I confirm the following information:

    • When did the issue first happen and how long has it been going on?
    • What device are you using (macOS, Windows)?
    • Is this issue affecting all chats or just specific ones (e.g., group chats, channels)?
    • Are other users in your organization experiencing the same issue?

    Your confirmation would be very helpful!

    Regarding this matter, I have tested it on my end, and this is what's on my Teams (version 25153.1010.3727.5483)

    Even though this Code feature has the same icon with Code Snippet, it's missing the word "Snippet" in my Teams.

    Therefore, could you provide a screenshot of your Code Snippet so I could have more details on this?

    That would help a lot!

    Kindly let me know when there are any updates so I could find additional ways to assist you.

    I'll be glad to hear your update!

    Best regards, 

    Julie-Hu - MSFT | Microsoft Community Support Specialist

    0 comments No comments
  2. Anonymous
    2025-07-10T08:10:17+00:00

    Hello Julie,

    Thank you for replying. To answer your questions:

    • I just noticed it yesterday, not sure how long it's been an issue, probably since one of the recent Teams updates
    • I'm on a Windows device
    • It affects all chats and channels
    • Not sure about other users

    The code feature you've pointed out is not a code snippet. It merely formats text into a monospaced typeface. With a code snippet, you are able to set the language. You can also do this with a code block, but IIRC code snippets have a much longer limit on how many characters are allowed.

    Send code snippets in a message in Microsoft Teams - Microsoft Support.

    According to the above link, code snippets were disabled 2025-May-30. No reasons provided why.

    Looking at your screenshot, that is similar to what I see when posting on a channel. However, when typing in a chat (which is 99.9% of what we do), the first three icons (quote, insert link, code block) are under the "more options" menu instead of being available at the header at top. You also have the ability to insert tables and insert/delete rows and columns. All of these would be nice to have.

    I'm unable to post screenshots from my work machine due to our organisation's security policies.

    Thank you,

    Samuel

    0 comments No comments
  3. Anonymous
    2025-07-10T14:55:21+00:00

    Hi Samuel,

    Thank you for your details! I really appreciate it!

    May I ask how was your experience with using Code Block? Is it a lot different from Code Snippet?

    If Code Snippet is more convenient for you to work with, I recommend Suggesting a Feature within Teams app so that the product team would investigate and they might consider bringing this Code Snippet feature back

    If you found my answer have addressed your question, feel free to mark it as the answer - it would really help other users with the same questions.

    Thank you for your understanding!

    Best regards, 

    Julie-Hu - MSFT | Microsoft Community Support Specialist

    0 comments No comments
  4. Anonymous
    2025-07-11T04:26:11+00:00

    fwiw, one can make a code block "collaborative" and with that, somewhat replicate the old snippet functionality

    0 comments No comments
  5. Anonymous
    2025-07-11T07:54:08+00:00

    Hi simonstey,

    Good day!

    Thank you for your information! I really appreciate it!

    Julie-Hu - MSFT | Microsoft Community Support Specialist

    0 comments No comments