How to Keep Line Breaks When Pasting Into Slack
By Khushi Yadav
In Slack, Enter sends the message and Shift+Enter starts a new line. When the text you paste contains real line breaks, they stay in the message box; trouble starts when you add lines by hand with Enter, or when the source only looked like separate lines. To make it reliable, set Slack's Enter key to start a new line (Preferences > Advanced), wrap logs and code in a code block, or send long text as a snippet with Ctrl+Shift+Enter.
Add a line without sending
Press Shift+Enter wherever you want a new line, before or after pasting. This is Slack's default and works in every message box.
Make Enter start a new line instead of sending
If you often paste and then edit multi-line text, change what Enter does:
- Click your profile picture in the Slack sidebar.
- Select Preferences, then Advanced.
- Under When writing a message, press Enter to, choose Start a new line.
From then on, press Ctrl+Enter to send. This is a personal setting, so it only changes your own Slack.
Keep lines exactly as pasted with a code block
A code block shows text in a monospaced font and keeps every line and space as you pasted it, which suits logs, stack traces, JSON and aligned columns.
- Paste the text into the message box.
- Select it and press Ctrl+Alt+Shift+C to turn it into a code block.
If Format messages with markup is turned on (Preferences > Advanced > Input options), you can type three backticks, paste the text, and type three more backticks instead. The backtick key is usually to the left of 1.
Send long text as a snippet
For a long log or file, a snippet keeps the message itself short and the text intact.
- Paste the text into the message box, then press Ctrl+Shift+Enter to turn it into a snippet. Or select the + next to the message box and choose Create a text snippet.
- Add a title if you like and choose a file type for syntax highlighting.
- Select Create snippet.
When the source is the problem
Sometimes the line breaks were never there:
- PDFs and narrow columns produce text that looks like separate lines but may not break where you expect. Paste into Notepad first to see the real line breaks. How to copy from a PDF without broken line breaks shows how to fix them.
- Formatted lists from Word, Google Docs or web pages are copied as HTML, and Slack can flatten or space them differently. Paste into Notepad, copy again, and paste that plain version into Slack. How to paste without formatting covers faster ways, and how to copy a list and keep the bullets covers bullets.
- Word's line breaks come in two kinds: paragraph breaks (Enter) and manual line breaks (Shift+Enter). Turn on formatting marks with Ctrl+Shift+8 in Word to see which one you have before copying.
- Git commit messages are usually hard-wrapped at about 72 characters, so each wrapped line arrives as its own line. How to copy a git commit message explains the wrapping and how to copy the message intact.
Tables and spreadsheets
A range copied from Excel is plain text with tabs between cells, so in a normal Slack message the columns rarely line up. For a small table, paste it into a code block so the monospaced font keeps the columns roughly aligned. For anything larger, attach the file or a screenshot. How to paste a snip into Discord, Slack and Teams covers images.
Canned replies with several lines
If you insert the same multi-line reply often, put it in a text expander with the line breaks built in, and test it in Slack once. How to build a library of canned responses shows how. Slack's own "snippets" are a different thing: text attachments in a conversation, not reusable replies.
FAQ
How do I send a message once Enter makes a new line?
Press Ctrl+Enter.
Why did Slack send my list one line at a time?
Each Enter you pressed while adding lines sent a message. Use Shift+Enter between lines, or switch Enter to start a new line.
How do I paste code into Slack without it being reformatted?
Use a code block (Ctrl+Alt+Shift+C) or a snippet (Ctrl+Shift+Enter). How to paste code into Word, email and chat covers other apps.
Related reading
- How to Paste Code Into Word, Email and Chat
- How to Paste Without Formatting on Windows
- How to Copy an Error Log Without the Noise
- How to Copy a List and Keep the Bullets
Sources
- Format your messages in Slack (Slack Help) — Shift+Enter starts a new line; the Enter key preference.
- Set your Enter key preference (Slack Help) — Preferences > Advanced, the two Enter options, Ctrl+Enter to send.
- Slack keyboard shortcuts (Slack Help) — Shift+Enter, Ctrl+Alt+Shift+C for a code block, Ctrl+Shift+Enter for a snippet.
- Format your messages in Slack with markup (Slack Help) — three backticks for a code block; the Format messages with markup option.
- Create or paste code snippets in Slack (Slack Help) — creating a text snippet from the desktop app.
- Keyboard shortcuts in Word (Microsoft Support) — Ctrl+Shift+8 shows nonprinting characters.
Khushi Yadav writes Edge Drop's workflow and design guides and is a B.Tech Computer Science Engineering student. Khushi's posts are checked against Microsoft's documentation and the Edge Drop fact sheet.
GitHub · LinkedInCopy. Stack. Drop.
Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.
Download for Windows Get from Microsoft Store
How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge Drop vs Win+V · Support
Free · Lightweight · Privacy First