Discord message builder
Build a Discord message with Components V2: text, images, sections, coloured containers and link buttons. See it the way your members will, then copy the JSON for a webhook or your bot. This page saves nothing and never sends your message anywhere. Pictures load from the address you type.
Message
Components in this message: 8 / 40Preview
Close to Discord, but not pixel for pixel. Discord looks a little different on every device. Pictures load from the address you type. The buttons here only show how they look.
Copy your message
Components in this message: 8 / 40This is the body of the message. Send it as JSON in a POST request to a webhook, or use it when your own bot creates a message. The flags value 32768 turns on Components V2. A webhook that no app owns also needs ?with_components=true in its URL, otherwise Discord ignores the components.
{
"flags": 32768,
"components": [
{
"type": 17,
"accent_color": 5763719,
"components": [
{
"type": 10,
"content": "## Welcome to the server"
},
{
"type": 10,
"content": "Read the **rules**, pick your roles and say hello. *Be kind* and have fun."
},
{
"type": 14,
"divider": true,
"spacing": 1
},
{
"type": 10,
"content": "-# Glad you are here"
},
{
"type": 1,
"components": [
{
"type": 2,
"style": 5,
"label": "Rules",
"emoji": {
"name": "📜"
},
"url": "https://example.com/rules"
},
{
"type": 2,
"style": 5,
"label": "FAQ",
"emoji": {
"name": "❓"
},
"url": "https://example.com/faq"
}
]
}
]
}
]
}How to build a Discord message with buttons
Add your components
Start with a container, the card with a coloured bar. Put text, a separator, an image gallery, a section and a row of link buttons inside. The arrows change the order.
Check the preview
The preview shows containers, sections, galleries and buttons much like Discord does. The counters turn amber close to a limit and red above it. If Discord would reject the message, you see what to fix.
Copy the JSON
Copy the webhook JSON and send it with a webhook or your own bot. There is no send button here, so you decide where the message goes. Already have JSON? Paste it into the import tab and keep editing.
Common questions
- What are Discord Components V2?
- Components V2 is Discord's newer way to lay out a message. Instead of one text with embeds below it, you stack components: text, separators, image galleries, sections with a small picture or a button next to the text, and containers that group all of that in one card. A message uses them when it carries the flag IS_COMPONENTS_V2, which is 1 << 15 or 32768. This builder sets the flag for you.
- Can I use content and embeds together with Components V2?
- No. Once the Components V2 flag is set, a message can only contain components. If you send content or embeds along with it, Discord answers with a 400 error. Use a text component in place of the message text and a container in place of an embed. The flag also cannot be removed again from a message that was sent with it.
- Can a webhook send buttons?
- Yes, link buttons. Discord's rule is this: a webhook that belongs to an app can send all components. A webhook that no app owns, like one you create in the channel settings, can only send non-interactive components, meaning ones that do not trigger an interaction for a bot to answer. That covers text, images, containers and link buttons. Such a webhook also needs ?with_components=true in its URL, otherwise Discord ignores the components. A button that gives a role or starts something needs a bot.
- What is a link button?
- A link button opens a web address when someone clicks it. In Discord's terms it is a button with the style link: it has a url and no custom id. A click sends nothing to a bot, so nothing has to react to it. That is why it also works in a webhook message. The label can be up to 80 characters long and the address up to 512.
- What is the difference between a Components V2 message and an embed?
- An embed has a fixed layout: author, title, description, fields, picture and footer. With Components V2 you choose the order yourself, and a container gives you the card look of an embed, coloured bar included. You cannot mix the two in one message. If the fixed layout is all you need, our free Discord embed generator is the quicker way.
- How does the limit of 40 components work?
- Discord allows up to 40 components in one message, and nested ones count too. A container with three texts and a row of two buttons already makes seven: the container, the texts, the row and both buttons. This builder also counts every picture in a gallery, so you stay on the safe side. Text has its own limit: all text in a message together can be up to 4000 characters. A gallery holds up to 10 pictures, a section up to 3 texts and a row up to 5 buttons.
Next step: Custom Commands V3
Buttons that do something need a bot
A link button only opens an address. With Custom Commands V3, a button starts a flow on your own bot: it answers the member, gives a role or counts the click.
See what a button can start