Create a snippet

Snippets are a quick, easy way to share bits of code, configuration files, or log files with your workspace.   

Note: You can't currently create or share snippets in our mobile apps.


Add a new snippet

You can create a new snippet from the desktop app and share it in any channel or direct message: 

  1. Next to the Slack message box, click the  plus sign button.
  2. Select Code or text snippet.
  3. Enter a title (optional) and select a file type from the menu. This can be plain text or a computer language such as HTML or Javascript.
  4. Check the box to share your snippet in a channel or DM.
  5. When you’re finished, click Create Snippet.

Keyboard shortcut: Shift Enter (Mac) or Ctrl Shift Enter (PC) will open a pop-up window for creating a new snippet in Slack.

Tip: Upload a plain text file in Slack and it will automatically convert to a snippet. Your teammates will be able to read it easily without opening a separate application. 👍🏽


Share a snippet

Sharing a snippet in Slack lets your members download it, view a raw version, or leave comments. You can do this when you create the snippet, or share the snippet elsewhere at any time.

For sharing options, just mouse over the snippet in your desktop app and click Share file. Next to Share in, you can choose which channel to post your snippet.

Edit a snippet

You can only edit a snippet that you have created. To find your snippets, click the   More items icon in the top right of the desktop app and select Your Files. Find and click on your snippet, then click the  pencil icon to edit.

Note: Unlike posts, you cannot have multiple editors for one snippet.

Related Articles

Recently Viewed Articles