Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a quick crop, press Windows + Shift + S, choose rectangular snip, and drag around the code. For a cleaner, presentation-ready image, select the lines in VS Code and run a code-screenshot extension such as CodeSnap, then copy or save the result. Whichever method you use, enlarge the editor text first, hide unrelated panels, crop tightly, and remove secrets before sharing.

Choose the right capture method

Method Best for What you control Trade-off
Windows Snipping Tool A fast, one-off crop of anything on screen Any rectangular area, including editor context It captures the screen appearance rather than understanding code
VS Code code-screenshot extension Documentation, tutorials, and polished examples Selected lines, syntax highlighting, frame, and export Requires an extension and a command or shortcut
ScreenshotNeo API Automated captures of a web page or rendered code sample Viewport, device, CSS, JavaScript, waiting, and output format It is a browser capture service rather than a desktop selection tool

Prepare the code before capturing it

  1. Show only the relevant lines. Select the smallest complete example that answers the question. Include imports or surrounding context only when omitting them would make the snippet misleading.
  2. Increase readability. In VS Code, use View > Appearance > Zoom In, or hold Ctrl (Windows/Linux) or Command (macOS) while scrolling. A larger font is more useful than a huge image that readers must zoom.
  3. Remove distractions. Close the Explorer, terminal, minimap, and unrelated tabs when they do not help explain the code. Zen Mode (View > Appearance > Zen Mode) can hide most surrounding UI.
  4. Inspect for secrets. Delete API keys, passwords, bearer tokens, private URLs, customer data, home-directory paths, and internal hostnames. Redact them in the source or replace them with clearly fake values before taking the image.
  5. Check the complete snippet. Make sure the first and last lines are visible, indentation is intact, and punctuation is not hidden under a selection highlight or mouse pointer.

Capture a selected area with Windows Snipping Tool

Windows has a built-in rectangular capture that works in VS Code, a browser, a terminal, or any other application.

  1. Open the file and position the code on screen.
  2. Press Windows logo key + Shift + S. The screen dims and the Snipping Tool toolbar appears.
  3. Choose Rectangular snip. Microsoft also provides freeform, window, and full-screen modes, but rectangular mode is usually the cleanest choice for a snippet.
  4. Drag from one corner of the code to the opposite corner. Leave a small, even margin so characters at the edge are not clipped.
  5. Release the mouse. The capture is copied to the clipboard, and a notification opens the Snipping Tool editor.
  6. Paste directly into an issue, chat, document, or image editor with Ctrl + V. To keep a file, select Save in Snipping Tool and choose PNG when text clarity matters.
  7. Use the editor’s pen, highlighter, crop, or erase tools only when an annotation genuinely helps. Save a new copy if you need to preserve the unmarked original.

When a rectangular snip is the better choice

  • You need to show a line number, error message, or small amount of surrounding UI.
  • The code is in an application that has no code-image extension.
  • You are answering a question quickly and do not need a themed frame or syntax re-rendering.

Limitations to watch for

A screen snip records exactly what is visible. Horizontal scrolling, a narrow editor, a low display scale, or a selection highlight can make code hard to read. Reposition the editor and capture again rather than enlarging a blurry image afterward.

Create a polished code image in VS Code

A code-aware extension can render selected lines with syntax colors and a consistent frame. The CodeSnap marketplace listing describes selecting code, creating a screenshot, and copying or saving the image; its shortcut conventions cover Windows, Linux, and macOS.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
  1. In VS Code, open Extensions from the Activity Bar or press Ctrl + Shift + X (Windows/Linux) or Command + Shift + X (macOS).
  2. Search for CodeSnap, verify the publisher and marketplace details, and select Install. Extension commands and shortcut labels can change with updates, so use the command name shown in your installed version.
  3. Open the source file and select the exact lines to export. Do not select an entire file merely to avoid deciding what readers need.
  4. Open the Command Palette with Ctrl + Shift + P (Windows/Linux) or Command + Shift + P (macOS), then run the CodeSnap command that creates a screenshot from the selection.
  5. Review the generated preview. Check that the language highlighting, line wrapping, background, and padding suit the destination.
  6. Choose the extension’s copy or save action. The CodeSnap listing documents image output, while the Code Screenshot marketplace listing documents PNG and SVG export as available capabilities; confirm the exact export choices in the extension you installed.

Make the generated image readable

  • Keep lines short enough to avoid awkward wrapping. If a long line is essential, widen the editor before selecting it.
  • Use a dark or light theme with sufficient contrast. Syntax colors should distinguish strings, comments, keywords, and numbers without relying on color alone.
  • Prefer PNG for ordinary code sharing because it preserves sharp edges and text. SVG can be useful where the destination accepts vector images and the extension offers that export.
  • Do not add decorative backgrounds that reduce contrast or make the snippet look like a terminal transcript when it is not one.

Capture only part of your code

“Only part” can mean a few lines, one function, or one screen region. Select or frame the smallest self-contained unit:

  • One function: include its signature and the closing brace, plus any short declaration needed to understand the return value.
  • A command example: include the prompt or command, but remove usernames, hostnames, and real tokens.
  • A diff: include enough unchanged context to show where the change belongs; avoid capturing an entire file.
  • A visual bug: include the relevant code and the visible error only when the relationship is useful. Otherwise, provide the code image and error text separately so both remain searchable.

After capture, zoom to 100% and inspect every character. A screenshot is not searchable or copyable in the same way as text, so put important code in a text block as well when accessibility, copying, or debugging matters.

Use a browser-rendered code sample instead

If your snippet is already in a documentation page, playground, or web application, capture the rendered page rather than the desktop editor. This preserves the page’s actual fonts, layout, and responsive behavior. Hide cookie notices, chat bubbles, and other overlays first when you are doing it manually. For repeatable work, an API is more reliable than moving a mouse around a browser.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF of a URL. Before the capture it can accept the cookie or consent banner like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a page containing your code sample, the shortest request is:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Replace the URL with the page that renders your snippet. The ScreenshotNeo documentation covers the request parameters and response behavior.

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

Options useful for code documentation

  • Full-page capture loads lazy images before capture; element capture can target one CSS selector.
  • Set a viewport or one of 12 device presets, choose a retina scale, and select PNG, JPEG, or WebP.
  • Apply custom CSS to remove a page panel or style a code block, and custom JavaScript to click an element before capture.
  • Wait for a selector, a delay, or network idle so syntax highlighting and generated code finish rendering.
  • Use dark mode, timezone, geolocation, custom headers, cookies, a user agent, or Authorization when the page requires them.
  • Block ads, trackers, requests, or resource types; hide selectors; resize the output; choose a cache TTL; or create a signed link for a public <img> tag.
  • For automation, submit asynchronous jobs with signed webhooks, capture up to 100 URLs per bulk call, query usage, or use the OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify a migration.

ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. Every feature is included on every plan: 1,000 shots per month are free with no card; paid plans start at $5 for 3,000 shots. Yearly billing provides two months free. Create a free ScreenshotNeo account to get the monthly allowance.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Troubleshoot common screenshot problems

The shortcut does nothing

Make sure the Windows key is not disabled by a keyboard utility or gaming mode, and try the shortcut with the editor focused. If it still fails, open Snipping Tool from the Start menu and choose New. On macOS or Linux, use the operating system’s capture shortcut or VS Code’s extension workflow instead; the Windows shortcut is platform-specific.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The image is blurry

Capture at the editor’s native scale, increase the font before capturing, and save PNG. Enlarging a small JPEG cannot restore character edges.

Lines are cut off

Widen the editor, disable wrapping if it changes the meaning of the sample, or select fewer lines. Leave a margin around the outermost characters when dragging a rectangle.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

CodeSnap cannot create a preview

Confirm that text is selected, the file is open in an editor, and the extension is enabled for that workspace. Reopen the Command Palette and run the installed command by name. If the command or shortcut differs from these instructions, follow the current extension listing rather than an old keyboard shortcut.

A web capture shows a popup or blank area

For a manual capture, dismiss the popup and wait for the page to finish loading. For an automated capture, wait for the specific code selector or network idle and check whether the page requires authentication, a custom user agent, cookies, or JavaScript.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A secret appeared in a shared image

Delete or revoke the exposed credential immediately, replace it in the source, and recapture. Do not rely on a blur tool if the original image may remain in clipboard history, issue attachments, browser caches, or version control.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability, and sharing checklist

  • Use a local screen snip for a single answer when setup time matters.
  • Use a code-aware extension when consistent styling and selected-line output matter.
  • Use an automated browser capture when the same page must be rendered repeatedly, at multiple viewports, or as part of a build or documentation pipeline.
  • Keep the source code in text alongside the image for search, copy/paste, screen readers, and future edits.
  • Name files with project, language, and revision information rather than vague names such as Screenshot 1.png.
  • Open the final file on another screen or at 100% zoom before publishing. Verify indentation, punctuation, contrast, and the absence of private data.

Frequently asked questions

Can I screenshot code without installing anything?

Yes. On Windows, Windows + Shift + S opens the built-in Snipping Tool. It works with any editor and can copy or save the selected rectangle.

Should I share a screenshot or the original code?

Use both when readers may need to copy, search, or run the example. The image communicates appearance; the text preserves accessibility and exact characters.

What format is best for code?

PNG is a dependable default for crisp text. Use SVG when your editor or extension provides it and the destination supports vector images.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Does Windows Snipping Tool capture a single application window?

Yes. Its toolbar includes window capture as well as rectangular, freeform, and full-screen modes; choose rectangular mode when you need only the code.

Can a code screenshot include line numbers?

Yes. Leave line numbers visible in VS Code before selecting the code or dragging the snip, but omit them when readers need to copy the example manually.

Why does syntax highlighting differ between a desktop capture and a web capture?

They render different environments. A desktop image uses your VS Code theme and fonts, while a web capture uses the page’s CSS, loaded fonts, and browser viewport.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.