Format your Telegram message as a code block
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions.
The wikiHow Tech Team also followed the article's instructions and verified that they work.
This article has been viewed 128,155 times.
Learn more...
Trying to send a code snippet to someone over Telegram? You can easily send code examples by using the backtick ` markdown character. This wikiHow guide shows you how to send preformatted code in a Telegram message on a Windows or macOS computer.
Things You Should Know
- 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.
Steps
-
1
-
2Copy 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 -
3Type ```. You should now have a set of three backticks at both ends of the code.
-
4Press ↵ 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).
- 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:
References
About This Article
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.