# How to Take Beautiful Code Screenshots on Mac

LazyScreenshots publishes a public search API over its indexed pages; the guide is at https://www.lazyscreenshots.com/agent-access.

Source: https://www.lazyscreenshots.com/blog/screenshot-code-mac-syntax-highlighted/
Source observed: 2026-09-15T21:51:17.549Z
Last checked: 2026-09-21T21:19:22.259+00:00
Indexed: 2026-09-15T21:56:40.93+00:00

---

# How to Take Beautiful Code Screenshots on Mac

**June 26, 2026 · LazyScreenshots Team**

We explain how to preserve code formatting, indentation, syntax colors, and typography in screenshots for technical posts, documentation, social media, pull requests, bug reports, presentations, and tutorials.

## Method 1: Built-in macOS screenshots

| Shortcut | Best for |
|---|---|
| `Cmd+Shift+4` | Selecting exact code lines |
| `Cmd+Shift+4`, then `Space` | Capturing the editor window with title bar and shadow |
| `Cmd+Shift+5` | Fine-tuning the capture area |

For cleaner raw captures: increase font size with `Cmd+=`; use a dark theme; hide the VS Code sidebar with `Cmd+B` and disable **View > Show Minimap**; hold Option while clicking a window to remove its shadow. The built-in tool produces no padding or background, so content behind the window can bleed into the edges.

## Method 2: VS Code extensions

### CodeSnap

CodeSnap has over **2 million installs**. To use it:

1. Install CodeSnap from the VS Code Extensions marketplace.
2. Select code.
3. Open the Command Palette with `Cmd+Shift+P` and search for CodeSnap.
4. Review the preview.
5. Click the camera icon to save or right-click to copy.

It follows the current VS Code theme, including One Dark Pro and Dracula, and supports background color, padding, border radius, and line-number settings.

### Polacode

Select code, open the Polacode panel, and save the image. It adds a Polaroid-style frame and remains functional, though it is updated less frequently than CodeSnap.

We add professional backgrounds, rounded corners, and device frames to code screenshots. [Try LazyScreenshots Free](https://www.lazyscreenshots.com/)

## Method 3: Web-based tools

### Ray.so

1. Paste code.
2. Select a language.
3. Choose a theme such as Midnight, Breeze, or Candy.
4. Toggle dark mode, padding, and line numbers.
5. Export PNG or copy to the clipboard.

Ray.so supports **over 30 languages** and high-resolution 2× images.

### Carbon

1. Paste code or drop in a file.
2. Choose a theme such as Monokai, Solarized, One Dark, or Dracula.
3. Choose language, font, and padding.
4. Export PNG or SVG.

Carbon supports more themes than Ray.so, adds a macOS-style frame with red/yellow/green buttons, and SVG export for scalable web images.

### Snappify

Snappify creates animated code walkthroughs and multi-step presentations. Its free tier provides basic screenshots; the paid version adds animations, custom fonts, and team features.

## Method 4: Native Mac app

**Silicon** creates code screenshots from the clipboard, supports **100+ languages** through the TextMate grammar system used by VS Code and Sublime Text, and runs offline so code stays on the Mac.

| Tool | Type | Languages | Offline | Price |
|---|---|---:|---|---|
| macOS built-in | System tool | Any, captures pixels | Yes | Free |
| CodeSnap | VS Code extension | Any VS Code supports | Yes | Free |
| Ray.so | Web | 30+ | No | Free |
| Carbon | Web | 150+ | No | Free |
| Snappify | Web | 100+ | No | Free / Paid |
| Silicon | Mac app | 100+ | Yes | Free |

## Terminal and shell output

ANSI colors exist inside Terminal and are lost when text is copied to a code screenshot tool. Use `Cmd+Shift+4+Space` to capture the Terminal window with its colors; hold Option while clicking to remove the shadow. Increase text from the default **11–13pt** to **16–18pt** with `Cmd+=`; restore with `Cmd+-` or `Cmd+0`.

Create a dedicated profile at **Terminal > Settings > Profiles**:

- Solid dark background; avoid transparency.
- SF Mono, JetBrains Mono, or Fira Code at 16pt.
- Window size **80×24** or **100×30**.
- Scroll bar disabled.

Open it with **Shell > New Window > [profile name]**.

## Fonts, sizes, and themes

### Fonts

- **JetBrains Mono:** Code-focused, readable at small sizes, with ligatures.
- **Fira Code:** Open-source font with programming ligatures; `=>` becomes an arrow.
- **SF Mono:** macOS monospace font with a clean, neutral appearance.
- **Cascadia Code:** Microsoft font with strong readability.
- **Source Code Pro:** Adobe open-source monospace font.

### Sizes

Use at least **16px** for web readability, **18–20px** for small social feeds, and **24px or higher** for projected presentations.

### Themes

Dark, high-contrast options include One Dark Pro, Dracula, Night Owl, Monokai, and GitHub Dark. For light sites, use GitHub Light or Solarized Light.

## Sharing and file size

- **Clipboard:** Paste with `Cmd+V` into Slack, Notion, GitHub comments, or image-enabled apps.
- **Drag and drop:** Drag a PNG from Finder into a compose window, editor, or upload field.
- **AirDrop:** Right-click, choose **Share > AirDrop**.
- **iCloud link:** Right-click in Finder and choose **Share > Add People**.

A code PNG is typically **under 500 KB**. For smaller blog assets, use WebP or optimize PNGs with `pngquant` or ImageOptim.

## Related

- [Mac Screenshot Keyboard Shortcuts](https://www.lazyscreenshots.com/blog/mac-screenshot-keyboard-shortcuts/)
- [Add Background & Borders to Screenshots](https://www.lazyscreenshots.com/blog/add-background-border-rounded-corners-screenshot-mac/)
- [Resize & Compress Screenshots on Mac](https://www.lazyscreenshots.com/blog/resize-compress-screenshots-mac/)
- [Make Screenshots Look Professional on Mac](https://www.lazyscreenshots.com/blog/make-screenshots-look-professional-mac/)

---

[Read this page’s summary](https://www.lazyscreenshots.com/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.lazyscreenshots.com%2Fblog%2Fscreenshot-code-mac-syntax-highlighted%2F&trace=t_8b965f9c5bc6)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from LazyScreenshots’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Only q is required. No account or setup.

`GET https://www.lazyscreenshots.com/agent/faq?q={question}&trace=t_8b965f9c5bc6`

[Tool guide and examples](https://www.lazyscreenshots.com/agent-access) · [OpenAPI](https://www.lazyscreenshots.com/api/public/v1/openapi.json) · [Page TLDR form](https://www.lazyscreenshots.com/agent-tools/page-tldr?url=https%3A%2F%2Fwww.lazyscreenshots.com%2Fblog%2Fscreenshot-code-mac-syntax-highlighted%2F). Opening a form does not execute a tool.