Tweet Embed Code & Click-to-Tweet Generator

Get the official X (Twitter) embed code for any post with a live preview, plus click-to-tweet, follow, reply, and like buttons.

X's official embed code for any post with a live preview, click-to-tweet and follow buttons built on X's Web Intents, and the timeline embed. Runs in your browser; nothing connects to your X account.

Paste the URL of any public post (x.com or twitter.com). The code comes from X's own embed service.

Theme

Embed code

Paste a post URL and press Get embed code.

How it works

Three jobs every site owner runs into with X, done in the browser with no signup.

  • Embed a post: the page asks X's public embed service (the same one WordPress and every CMS use) for the official code of the post you paste, with the options that service accepts: light or dark theme, hide the post it replies to, hide media and link cards, alignment, width, language, and Do Not Track. The markup is shown exactly as X returns it; Load preview draws it with X's script so you see the card before you paste the code.
  • Buttons and click-to-tweet: X's Web Intents are plain links that open the composer, the follow prompt, or a reply, repost, or like for a given post. The tab builds the link and the official button markup (a Post or Follow button drawn by X's script), with a live 280 count for the pre-filled text.
  • Timeline embed: the code for a profile or list timeline with width, height, theme, and the chrome options, next to the fact that it renders only for visitors logged in to X.

Nothing is fetched through this site: the requests go from your browser to X's embed service and script. X's display rules apply to anything you embed: leave the card as X draws it and keep the author's name and handle visible.

What you will see

Embed code
The blockquote plus script to paste into your page's HTML. The quote and link inside it are the fallback shown where the script cannot run.
Author and text
The post's author and text as returned by X's embed service, so you can confirm you have the right post before copying.
Theme, hide reply, hide media, align, width, language, dnt
The options X's embed service and script honour.
Intent link and button code
The bare x.com/intent/... link (works anywhere, including email) and the official button markup that X's script draws.
Timeline code
The twitter-timeline anchor with your options; logged-in visitors only.

Frequently asked questions

How do I embed a tweet (X post) on my website?

Paste the post's URL into the Embed tab. The page asks X's own embed service for the official code, a blockquote with the post text and a small script from platform.twitter.com that turns it into the live card, and shows it with a preview. Copy the code and paste it into your page's HTML where the post should appear; on WordPress, paste the bare post URL into a paragraph or Embed block and WordPress fetches the same embed for you.

Can I embed a video from X?

Yes, with the same code. A post that carries a video embeds as the post, and the video plays inside the embedded card. There is no separate video-only embed from X; if you want only the video without the post text, X does not offer that, and downloading the file is against its terms.

Why does the embed show only a link and no card?

The card is drawn by X's script, which has to load from platform.twitter.com on your page. Content blockers, a strict Content Security Policy on your site, or a page builder that strips script tags leave the plain quote and link (that is the fallback the blockquote provides). Deleted posts, protected accounts, and posts from suspended accounts also fall back to the link.

What is a click-to-tweet link and how do I make one?

A link that opens X's composer with your text already filled in, so a reader can post it in one click: https://x.com/intent/post?text=..., with optional URL, hashtags, and a "via" handle. The Buttons tab builds the link and the official button markup; put the link on any text or image, or use the button snippet where you want X's own styled button.

How do I add a Follow button for my X account?

The Buttons tab makes both forms: a plain link to https://x.com/intent/follow?screen_name=yourhandle, which opens the follow prompt on X, and the official twitter-follow-button markup, which X's script draws as a Follow button with your handle. The bare link works everywhere, including places that strip scripts, such as email and most page builders.

Can I embed my X timeline or feed on my website?

You can generate the code (the Timeline tab does), but since 2023 the embedded timeline shows posts only to visitors who are logged in to X; everyone else sees "Nothing to see here". That makes it useless as a public feed, which is why the tab says so next to the code. To show your posts publicly, embed individual posts, or link to your profile.

Does X have RSS feeds or a link shortener?

No to both. X removed RSS in 2013, and the third-party bridges that rebuilt feeds (Nitter and its mirrors) were shut down in 2026, so there is no feed to subscribe to. Links are shortened automatically: every URL in a post becomes a t.co link and counts as 23 characters, so you never need a shortener for X.

Is this free, and does it connect to my X account?

Free with no signup. Nothing connects to your X account; the only requests go from your browser to X's public embed service for the code and, when you press Load preview, to X's script. Embeds are covered by X's display rules: show the post as X renders it, do not alter the markup, and keep the author's name and handle visible.