DevTools Logo

Slack Block Kit Builder

Slack Block Kit Builder

Compose Block Kit messages with live limit validation and copy-ready payloads.

Runs in your browser
Add block
Try an example

Blocks

0/50 blocks

No limit issues found.

Preview & payload

4 lines · 32 chars

No blocks yet

Add a block, paste JSON or load an example.

Examples

Release announcement

Input
header + section + divider + context
Output
{ "text": "…", "blocks": [4 blocks] }

A compact announcement ready for chat.postMessage.

Approval buttons

Input
actions with Approve / Deny buttons
Output
action_id: approve, deny

Interactive elements keep the identifiers your Slack app listens for.

Over-long header

Input
153 plain_text characters
Output
Error at blocks[0].text: the limit is 150

The broken preset demonstrates the counter and fix hint.

About this tool

Slack Block Kit Builder is an offline authoring surface for Slack message payloads. It composes section, header, divider, image, context, actions and input blocks from a palette, validates them while you type and exports the JSON you hand to chat.postMessage or an incoming webhook.

The validator encodes Slack's documented limits: 50 blocks per message, 3000 characters of mrkdwn per section, ten fields of up to 2000 characters, 150 characters in a header, 75-character button and option labels, and 10 context elements. Interactive elements must carry an action_id of at most 255 characters.

A live Slack-styled preview renders header, section, divider, image, context and actions blocks; mrkdwn is escaped first, so pasted HTML cannot execute. The payload pane switches between chat.postMessage JSON, webhook JSON and a curl command with a placeholder webhook URL — no token or channel is embedded and no request is sent.

Input blocks are flagged in message payloads because Slack only accepts them in modal views. Switch the payload target to Modal view to author a legal views payload instead. Imported JSON with unknown block types is preserved for round-tripping and reported as a warning rather than silently dropped.

What this tool does not do

  • Authoring only: nothing is sent and no Slack workspace is contacted.
  • The preview covers common blocks and a safe mrkdwn subset, not every Slack client styling detail.
  • Modal payloads use a generic title and submit label; edit the JSON for a fully custom view.
  • Overflow options are capped at six conservatively because Slack's documentation is ambiguous and larger menus are reported to fail at send time.
  • Workflow-step, unfurl and video blocks are preserved on import but have no editor or preview.

How to use this tool

  1. Start from a block

    Use Add block to append a section, header, divider, image, context, actions or input block, or paste an existing JSON array into the editor.

  2. Load a preset

    Release announcement, Incident notice, Approval request and a deliberately broken example are one click away in the example row.

  3. Edit the JSON

    The block list and editor are the same source of truth. Reorder with the arrow buttons or edit the JSON text directly; the preview updates live.

  4. Check the limits

    Read the validation line under the editor. Errors block the ready state; warnings such as an unknown block type or too many actions are informational.

  5. Choose a target

    Select chat.postMessage, incoming webhook or modal view. Modal view is the only target where input blocks are legal.

  6. Copy or download

    Switch between postMessage, webhook and curl tabs, then copy the payload or download slack-payload.json.

Use cases

Bot notification authoring

Draft deploy and incident messages with real limits before sending them from your app.

Automation payloads

Produce the exact blocks array a no-code workflow or incoming webhook needs.

Import and audit

Paste an existing payload to see unknown types, missing action_id values and over-long text at a glance.

Webhook curl snippets

Copy a ready-to-run curl command with a placeholder URL for local testing against your own webhook.

Validated Block Kit limits

ElementLimit
Blocks per message50
Section text / field3000 / 2000 chars; 10 fields
Header text150 chars, plain_text
Button and option text75 chars
action_id255 chars, required
Overflow options6 (conservative cap)
Context elements10 × 3000 chars
Actions elements25 (soft cap 8)

Fallback text is derived from the first section when left empty; the curl snippet uses a placeholder webhook URL and never stores a token.

Common mistakes

Mistake:Putting input blocks in a channel message.

Fix:Input blocks are modal-only. Switch the payload target to Modal view or remove the block.

Mistake:Assuming fields mode allows only two fields.

Fix:Slack allows up to ten fields of 2000 characters; the builder follows that limit.

Mistake:Forgetting action_id on a button.

Fix:Add a unique identifier of at most 255 characters; the validator points at the exact element path.

Mistake:Treating preview fidelity as pixel-perfect.

Fix:The preview is structural: block order, text and actions are faithful, but Slack's client styles can differ.

Mistake:Pasting a real webhook URL into the tool.

Fix:The curl emitter uses a placeholder; keep real webhook URLs and tokens out of the page.

Frequently asked questions

How many blocks fit in one Slack message?

Fifty. The builder blocks additions at 50 and flags imported payloads that exceed the cap. Text limits are enforced per block: 3000 characters of section text, 150 in a header, 75 for button and option labels, and ten context elements of up to 3000 characters each.

What are the text length limits per block?

Section text is capped at 3000 characters, with up to ten fields of 2000 characters each. Headers allow 150 plain_text characters. Button and option labels allow 75, option values 2000, image URLs 3000, alt text 2000, and placeholders 150. Counters are measured in Unicode code points so emoji count as one character.

Should I use mrkdwn or plain_text?

Use mrkdwn for section and context text when you want bold, italic, strike, inline code, quotes or links. Headers must be plain_text. Buttons and other labels are plain_text too; the preview renders a safe subset of mrkdwn for sections.

Can I test-send a message from here?

No. The tool never makes a network request. It emits a curl command with a placeholder webhook URL you can replace locally, but pasting a live webhook URL into this page is unnecessary and discouraged.

Are interaction payloads and action_id included?

Yes. Buttons, selects, datepickers, checkboxes and other interactive elements keep their action_id values in the exported JSON. Missing or over-long action_id values are reported as errors before you copy the payload.

Why are my input blocks rejected?

Slack accepts input blocks only in modal views, never in channel messages or incoming webhooks. Choose Modal view as the payload target to export a legal views payload containing them.

What happens to blocks the builder does not know?

Unknown block types are preserved verbatim so importing and re-exporting stays safe. They are listed as warnings and shown as an explanatory line in the preview rather than being silently dropped.

Can I import an existing payload?

Yes. Paste either a bare JSON array of blocks or an object with a blocks array. Attachments and other extra keys are ignored by the preview but the blocks array itself is kept intact for export.

References & standards