Discord is one of the most popular instant messaging apps with hundreds of millions of users. It’s a place for everyone - whether you want to run a coding community or create a server for your gaming friends, you can do so on Discord.

Since Discord mainly focuses on text and voice chatting, there are a lot of features that can improve the experience of its users. One of the features that benefit the users is the text formatting language markdown.

Using markdown, users can make their text messages look much better and make them accessible. One of the styling you can apply to your messages is code blocks. They allow you to share code snippets that look better, escape other Discord formatting methods, and are much more accessible than code snippets as plain text messages.

In this guide, we’re going to teach you how you can use code block formatting so you can improve your and your fellow users’ Discord experience.

What is Discord Formatting?

Discord formatting is a way to give style to plain texts. The simple concept of formatting is something we are all familiar with - when you make a text bold in Microsoft Office, you’re using formatting, same with making a text italic in WhatsApp.

Discord uses the formatting language called markdown. It’s a very common language that’s used in Reddit, Stack Exchange, Discord, WhatsApp, GitHub, and many more platforms. The reason why you should learn about Discord formatting is that most users, even though they chat a lot, don’t know how to properly format their messages.

Learning formatting is especially important if you’re a server owner. The visual attractiveness of a server plays a huge role in transforming it from a good to a great server. Instead of using plain texts in your core channels like #rules and #server-information, using formatting styles like headers, bolds, bullet points, and numbered lists will make your server look better.

One of the most common formatting styles used in Discord is code blocks - so let’s take a look at how you can use them.

How to Use Code Block Formatting in Discord

Code blocks are the best way to share code snippets with your friends.

There are two ways to share code in Discord - the first one is inline code formatting. It can be done by surrounding your text with backticks (`). However, there are a few disadvantages of inline code formatting: it’s only suitable for a single line of code, doesn’t support syntax highlighting, and doesn’t have a copy button.

Code blocks, on the other hand, supports multi-line code, supports syntax highlighting and has a copy button that allows users to copy the whole code block with a single click.

discord code block

Formatting a text as a code block is very easy - you just have to surround your code with three backticks (```), and you’re done.

Although it’s extremely simple, there are a few tricks that you can use to make your code blocks look even better.

The first suggestion we have for you is to reserve two lines for the initial and final backticks. This will improve your message’s readability for you - when you send the message, the backticks won’t be visible.

codeblocks lines

The second suggestion we have is to use syntax highlighting so you can improve the readability not just for yourself but for others as well. To use syntax highlighting on your code block, you should add the abbreviation or full name of the coding language you want after the initial three backticks.

There are a lot of language options since Discord uses highlight.js. One thing you should keep in mind is that in order to use syntax highlighting, you should reserve a line at the top for the initial three backticks and the name of the coding language.

coding highlight

The last but one of the most important features of code block formatting is the copy button. When you hover over a code block, you’ll see that a copy button will appear on it. Clicking that button will copy the entire contents of the code block.

Discord copy code

Explore Discord With Whop!

Whether you're looking for more ways to improve the appearance of your Discord server, searching for new Discord servers to join, or looking for a way to make money with Discord, you can find it all right here on Whop.

For more Discord tips, tricks, and guides, keep exploring the blog and read our Discord articles.

If you're searching for new servers to join, check out the Whop marketplace.

Or, if you want to start making money with Discord, then explore your options with Whop. Monetizing your Discord server has never been easier. Whop has been helping thousands of people with monetizing their servers and generating an income - why not be a part of it?