Download Article
Format your Telegram message as a code block
Download Article

Trying to send a code snippet to someone over Telegram? You can easily send code examples by using the backtick ` markdown character. This How.com.vn guide shows you how to send preformatted code in a Telegram message on a Windows or macOS computer.

Sending Code on Telegram

  • Type ``` at the beginning and end of the code text to format it as a code snippet.
  • This will maintain the code's formatting, which is great for sending code examples.
  • Alternatively, use Formatting > Monospace to format the code as monospace font.
  1. How.com.vn English: Step 1 Type ```.
    Typing this syntax in your Telegram chat will allow you to format text as a code snippet. To keep the code in an easy-to-read format, you'll need to add three ` (backticks) at its beginning and end. There's no need to add a space.[1]
  2. How.com.vn English: Step 2 Copy and paste the code after the backticks.
    To do so:
    • Press Ctrl+C (Windows) or Cmd+C (macOS) to copy a highlighted section of code.
    • Switch to the Telegram chat you want to paste the code into.
    • Press Ctrl+V (Windows) or Cmd+V (macOS). This pastes the copied code into the typing area.
    Advertisement
  3. How.com.vn English: Step 3 Type ```.
    You should now have a set of three backticks at both ends of the code.[2]
  4. How.com.vn English: Step 4 Press ↵ Enter or ⏎ Return.
    The code will now appear in the conversation in its original format.
    • As an alternative to using backticks, you can format the text as monospace, a popular font style for code. Note that this won't preserve the code's indent formatting. To make Telegram text monospace:
      • Highlight the code.
      • Select Formatting > Monospace.
      • Or, press Ctrl+ Shift+M (Windows) or Cmd+ Shift+M (macOS).
  5. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn English: Kyle Smith
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Kyle Smith. Kyle Smith is a How.com.vn Technology Writer, learning and sharing information about the latest technology. He has presented his research at multiple engineering conferences and is the writer and editor of hundreds of online electronics repair guides. Kyle received a BS in Industrial Engineering from Cal Poly, San Luis Obispo. This article has been viewed 222,360 times.
      How helpful is this?
      Co-authors: 5
      Updated: March 29, 2024
      Views: 222,360
      Article SummaryX

      1.Copy the code.
      2.Open Telegram.
      3.Select a conversation.
      4.Click the Write a message box.
      5.Type ```.
      6.Paste the code.
      7.Type ```.
      8.Press Enter or Return.

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 222,360 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement