Skip to main content
Bots & Automation

How to Create Discord Webhook Embeds: JSON Payloads, discord.js & Python Guide

Master Discord webhook embeds with this complete visual guide. Learn embed JSON formatting, color integer conversion, field layouts, and automation with curl, discord.js, and Python.

Rayyan
2026-09-29
15 min read

Key Takeaways & Summary

  • •Discord embed colors must be formatted as base-10 decimal integers (e.g., 5793266 for Blurple), not hex strings.
  • •Embed titles have a 256-character limit, and descriptions have a 4096-character limit.
  • •Inline fields allow up to 3 columns per row on desktop Discord clients, creating compact statistics tables.
  • •Embeds support dynamic Discord timestamps (<t:EPOCH:STYLE>) inside descriptions and field values.
  • •Our Discord Embed Generator lets you design embeds visually with live dark mode chat preview and 1-click code export.
Desktop & Mobile App Support:Tested and verified for Discord desktop, web browser, and mobile apps (iOS & Android).

Learn how to format rich Discord webhook embeds with live visual previews, convert hex colors to integers, and automate delivery using curl, Node.js, and Python.

Discord webhooks allow external scripts, GitHub repositories, and game servers to post automated announcements directly into Discord channels. While standard webhooks send plain text messages, rich embeds provide structured cards with color accent bars, bold titles, thumbnail graphics, multi-column inline fields, and dynamic timestamps. Building an embed requires constructing a JSON payload that adheres to the official Discord Webhook REST API specification. In this guide, we break down every property of the Discord embed object, explain how to convert hex colors to base-10 integers, and demonstrate automated posting across curl, JavaScript, and Python.

Anatomy of a Discord Embed Payload

A Discord webhook message accepts an array of embed objects named 'embeds' (up to 10 embeds per message). Each embed can contain the following properties:

- title: The primary headline linkable via the 'url' parameter. - description: The main body text supporting full Markdown (bold, lists, timestamps). - color: Decimal integer controlling the vertical accent bar on the left edge. - fields: Array of up to 25 name/value pairs with optional inline alignment. - author: Object containing name, url, and icon_url. - footer: Object containing text and icon_url. - image & thumbnail: Media objects specifying full-width banners and corner icons.

Complete Discord webhook embed JSON structurejson
{
  "username": "Server Bot",
  "avatar_url": "https://i.imgur.com/example.png",
  "embeds": [
    {
      "title": "Weekly Community Tournament",
      "url": "https://disctimestamps.site",
      "description": "Registration is open! The tournament starts <t:1790683200:R>.",
      "color": 5793266,
      "fields": [
        {
          "name": "Entry Fee",
          "value": "Free",
          "inline": true
        },
        {
          "name": "Prize Pool",
          "value": "$500",
          "inline": true
        }
      ],
      "footer": {
        "text": "Hosted by Community Team"
      }
    }
  ]
}

Converting Hex Colors to Decimal Integers

The most frequent error when building Discord webhook embeds is passing a hex color code string like '#5865F2' instead of an integer. The Discord API expects a 24-bit numeric value.

To convert any 6-digit hex code to decimal, strip the '#' symbol and parse it as a base-16 integer:

In JavaScript: parseInt('5865F2', 16) === 5793266

In Python: int('5865F2', 16) === 5793266

Color NameHex CodeDecimal Integer (Discord API)Visual Role
Blurple (Brand)#5865F25793266Official notices, community updates
Green (Success)#57F2875763719Server online, verification passes
Yellow (Warning)#FEE75C16705372Maintenance notices, warnings
Red (Danger)#ED424515548997Server downtime, bans, security alerts
Dark Charcoal#2B2D312829617Neutral stealth cards matching Discord theme

Automating Delivery in Node.js, Python and cURL

Here is how to dispatch your embed payload to a Discord webhook URL using popular developer tools:

Sending Discord webhook embeds across environmentsjavascript
// Node.js (Fetch API)
const webhookUrl = 'https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN';

await fetch(webhookUrl, {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify(payload)
});

# Python (Requests)
import requests
requests.post(webhook_url, json=payload)

# cURL (Bash)
curl -H "Content-Type: application/json" -X POST -d @payload.json $WEBHOOK_URL
Related Search Queries & Topics
discord webhook embed generatordiscord webhook builderdiscord webhook json payloaddiscord embed visualizerdiscordjs webhook embedpython discord webhook embed

Frequently Asked Questions

Straightforward answers to common questions about this topic.

Yes. By appending '/messages/MESSAGE_ID' to your webhook URL and using the PATCH HTTP method, you can update the title, description, or embed fields of an existing webhook message.

Generate Your Discord Timestamps Now

Convert any date or countdown into auto-adjusting Discord tags with 1-click copy.

Open Free Generator