explaingit

vercel/satori

Analysis updated 2026-06-24

13,412TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A Vercel library that converts HTML and CSS written as React JSX into SVG images entirely in code, no browser needed, most commonly used to auto-generate social sharing preview cards.

Mindmap

mindmap
  root((repo))
    What it does
      HTML to SVG conversion
      No browser needed
      Static image output
    Input
      React JSX syntax
      CSS Flexbox layout
      Custom fonts required
    Use Cases
      Social preview cards
      Open graph images
      Dynamic thumbnails
    Deployment
      Edge environments
      Node.js serverless
      Next.js integration
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate open graph preview images for blog posts automatically when a new article is published.

USE CASE 2

Create dynamic social sharing cards with custom fonts, colors, and user data from a serverless function.

USE CASE 3

Build an API endpoint that returns PNG thumbnail images generated from HTML templates on demand.

USE CASE 4

Render template-based certificates or badges as SVG files in a Node.js backend without spinning up a browser.

What is it built with?

TypeScriptReactNode.jsSVG

How does it compare?

vercel/satorichartist-js/chartistfkhadra/react-toastify
Stars13,41213,39413,437
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Fonts must be provided as buffer data, there is no automatic font loading like a browser provides.

In plain English

Satori is a library from Vercel that converts HTML and CSS into SVG images entirely in code, without a browser. You describe what you want using the same syntax developers use when building React web pages, and Satori produces a scalable image file as a result. The most common use case is generating social sharing images, such as the preview cards that appear when you paste a link into Twitter or Slack. The library accepts a limited but practical subset of HTML elements and CSS styling. Layout is handled using the same Flexbox engine that React Native uses, so most standard positioning and sizing rules work as expected. It does not support interactive elements, animations, or external scripts since the goal is to produce a static image, not a full web page. Fonts must be provided explicitly because there is no browser to load them automatically. You write the content as JSX, which is the tag-based notation used in React development. If your project does not use React, Satori can also accept plain JavaScript objects that describe the same structure. The result is an SVG string that you can save, serve, or convert to PNG using a separate image-processing tool. Satori runs in edge environments and Node.js, which means it can be used inside serverless functions that generate images on demand. Vercel's own Open Graph image generation service is built on top of it, and there is a Next.js template specifically for that workflow. The project is open source and available as an npm package. The README includes a detailed table of supported CSS properties, code examples, and links to a live playground where you can experiment with the output.

Copy-paste prompts

Prompt 1
Show me how to use Satori to generate an open graph image for a blog post with a title, author name, and background color.
Prompt 2
How do I use Satori inside a Next.js API route to create dynamic social preview cards for each page?
Prompt 3
Write a Satori template that renders a user profile card with a username and follower count as an SVG.
Prompt 4
How do I convert a Satori SVG output into a PNG file using a Node.js image processing library?
Prompt 5
How do I load a custom font file into Satori so the generated images use my brand typography?

Frequently asked questions

What is satori?

A Vercel library that converts HTML and CSS written as React JSX into SVG images entirely in code, no browser needed, most commonly used to auto-generate social sharing preview cards.

What language is satori written in?

Mainly TypeScript. The stack also includes TypeScript, React, Node.js.

How hard is satori to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is satori for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.