Code Screenshot Generator

Paste code, style it, and export as a PNG image.

Preview

function greet(name: string): string {
  return `Hello, ${name}!`;
}

console.log(greet("World"));

About This Tool

How to Use
  1. Paste your code into the editor
  2. Select the programming language for syntax highlighting
  3. Choose a theme (One Dark, Dracula, One Light, VS)
  4. Adjust padding, background color, and corner rounding
  5. Click Download PNG to export the styled snippet as an image
Common Use Cases
  • Sharing code snippets on Twitter, LinkedIn, or blog posts
  • Creating attractive code examples for documentation or presentations
  • Adding styled code blocks to design mockups
  • Teaching programming concepts with visually appealing examples
Tips & Tricks
  • Dark themes like One Dark and Dracula tend to look best on social media
  • Increase padding for a more spacious, professional look
  • Use a transparent or matching background when embedding in slides

You might also like

Prettier Code Formatter & Colorizer

Reformat and colorize your code using Prettier and react-syntax-highlighter. Easily convert messy code into a clean, readable format with syntax highlighting.

Text Diff Checker

Compare two blocks of text side-by-side and instantly see additions, deletions, and changes highlighted. Perfect for comparing code, documents, or configuration files.

JSON Formatter & Validator

Paste JSON to pretty-print, validate, minify, and explore. Click any node in the tree view to copy its JSONPath expression — perfect for building API queries.

CSV & Excel Viewer

Open CSV, TSV, and Excel files in a fast, sortable table. Filter rows, edit cells, and export your changes — all in your browser with no uploads.