Skip to main content

Overview

File Explorer Add-ons extend Windows File Explorer with preview and thumbnail support for file types not natively supported by Windows. View file contents directly in the preview pane without opening external applications.
File Explorer Add-ons work with Windows File Explorer’s built-in preview pane (Alt+P to toggle).

Activation

1

Enable File Explorer Add-ons

Open PowerToys Settings and navigate to File Explorer section
2

Enable Individual Handlers

Toggle on the preview handlers you want to use
3

Show Preview Pane

In File Explorer, press Alt+P or click View → Preview pane
4

Select File

Click on a supported file to see preview

Key Features

Supported File Types

Code Files

Monaco Preview HandlerSyntax-highlighted code preview.cs, .cpp, .py, .js, .ts, .json, .xml, .html, .css, .md, .sql

Markdown

Markdown Preview HandlerRendered Markdown documents.md, .markdown

SVG Images

SVG Preview & ThumbnailVector graphics preview.svg files

PDF Documents

PDF Preview & ThumbnailPDF document preview.pdf files

G-code

G-code Preview & Thumbnail3D printing code preview.gcode, .bgcode files

STL Models

STL Thumbnail3D model thumbnails.stl files

QOI Images

QOI Preview & Thumbnail“Quite OK Image” format.qoi files

Preview Handlers

Preview handlers display file contents in the preview pane:
Features:
  • Syntax highlighting
  • Line numbers
  • Multiple language support
  • Read-only view
Supported languages:
  • C/C++/C#
  • Python
  • JavaScript/TypeScript
  • JSON/XML
  • HTML/CSS
  • Markdown
  • SQL
  • And 50+ more
Implementation: Uses Monaco Editor (VS Code’s editor)

Thumbnail Providers

Generate thumbnails for File Explorer icon view:
// Thumbnail provider interface implementation
class ThumbnailProvider : public IThumbnailProvider
{
public:
    // Generate thumbnail from file
    HRESULT GetThumbnail(
        UINT cx,              // Requested width
        HBITMAP *phbmp,       // Output bitmap
        WTS_ALPHATYPE *pdwAlpha  // Alpha channel type
    );
};
Supported:
  • SVG Thumbnail: Rasterized vector graphics
  • PDF Thumbnail: First page preview
  • STL Thumbnail: 3D model render
  • G-code Thumbnail: Embedded preview image or toolpath
  • QOI Thumbnail: Decoded QOI image

Configuration

Enable/Disable Handlers

Individually control each preview handler:
monaco_preview
boolean
default:"false"
Enable Monaco code preview handlerPerformance note: May be slower for very large files
markdown_preview
boolean
default:"false"
Enable Markdown preview handler
svg_preview
boolean
default:"false"
Enable SVG preview handler
svg_thumbnail
boolean
default:"false"
Enable SVG thumbnail provider
pdf_preview
boolean
default:"false"
Enable PDF preview handler
pdf_thumbnail
boolean
default:"false"
Enable PDF thumbnail provider
gcode_preview
boolean
default:"false"
Enable G-code preview handler
gcode_thumbnail
boolean
default:"false"
Enable G-code thumbnail provider
stl_thumbnail
boolean
default:"false"
Enable STL 3D model thumbnail provider
qoi_preview
boolean
default:"false"
Enable QOI image preview handler
qoi_thumbnail
boolean
default:"false"
Enable QOI image thumbnail provider

File Association

Preview handlers register for specific file extensions in Windows registry:
HKEY_CLASSES_ROOT\.md
  └─ shellex
      └─ {8895b1c6-b41f-4c1c-a562-0d564250836f}
          = "{CLSID of MarkdownPreviewHandler}"
Automatic registration: PowerToys installer handles registration

Use Cases

Software Development

Quick preview of source code files:
  1. Enable Monaco preview handler
  2. Navigate to project directory
  3. Click files to preview without opening IDE
  4. Review code changes quickly
Benefits:
  • Syntax highlighting
  • No need to open full editor
  • Fast file browsing
Preview README and documentation:
  • Enable Markdown preview
  • Click README.md to see rendered output
  • Review docs before editing
  • Verify formatting
Preview JSON, XML, YAML configs:
File Explorer
├─ config.json        ← Click to preview
├─ appsettings.json   ← Syntax highlighted
└─ package.json       ← Formatted JSON

Design & Graphics

1

SVG Management

Enable SVG preview and thumbnailsBrowse icon libraries visually
2

Quick Preview

Click SVG files to see vector graphicsNo need to open design software
3

Batch Review

Use thumbnail view to see all SVGsFind icons quickly

3D Printing

G-code Inspection

Preview G-code files before printing
  • View toolpath
  • Check layer heights
  • Estimate print time

Model Thumbnails

STL thumbnail generation
  • Visual model previews
  • Browse models easily
  • Identify files quickly

Document Management

Quick document review:
  1. Enable PDF preview
  2. Browse document folders
  3. Click PDFs to preview
  4. No need to open full PDF reader
Use cases:
  • Invoice review
  • Document selection
  • Quick reference

Technical Details

Architecture

Preview Handler Structure

src/modules/previewpane/
├─ MonacoPreviewHandler/
│   ├─ MonacoPreviewHandler.cpp     # C++ wrapper
│   └─ MonacoPreviewHandlerControl/  # .NET implementation
├─ MarkdownPreviewHandler/
│   ├─ MarkdownPreviewHandler.cpp
│   └─ MarkdownPreviewHandlerControl/
├─ SvgPreviewHandler/
├─ PdfPreviewHandler/
├─ GcodePreviewHandler/
└─ common/                      # Shared utilities
Source: src/modules/previewpane/README.md

Preview Handler Process

Preview handlers run in isolated process:
// Preview handler isolation
// Handlers run in prevhost.exe surrogate process
// Protects File Explorer from crashes
// Each handler in separate AppDomain/.NET process
Benefits:
  • Crash isolation
  • Memory management
  • Security sandboxing

Implementation Pattern

Typical handler implementation:
// C++ Preview Handler Interface
class PreviewHandler : 
    public IPreviewHandler,
    public IInitializeWithStream,
    public IOleWindow
{
public:
    // Load file content
    HRESULT Initialize(IStream* pstream, DWORD grfMode);
    
    // Create preview window
    HRESULT SetWindow(HWND hwnd, const RECT* prc);
    
    // Render preview
    HRESULT DoPreview();
    
    // Cleanup
    HRESULT Unload();
};

Keyboard Shortcuts

File Explorer

ShortcutAction
Alt+PToggle preview pane
Arrow Up/DownNavigate files (preview updates)
EnterOpen file in default application
Ctrl+ScrollZoom thumbnail size

Troubleshooting

Check:
  • Preview pane is visible (Alt+P)
  • Specific handler is enabled in PowerToys Settings
  • File extension is supported
  • File is not locked/in use
Fix:
  1. Restart File Explorer (Task Manager → Windows Explorer → Restart)
  2. Disable and re-enable handler
  3. Restart PowerToys
Possible causes:
  • Thumbnail cache corrupted
  • Handler not enabled
  • File too large
Solutions:
  1. Enable thumbnail provider in settings
  2. Clear thumbnail cache:
    del /f /s /q /a %LocalAppData%\Microsoft\Windows\Explorer\thumbcache_*.db
    
  3. Restart File Explorer
Performance issue:
  • Monaco handler loads entire file
  • Large files (>1MB) may be slow
Workaround:
  • Disable Monaco handler for large files
  • Use external editor for large files
  • Consider file size limits in settings (if available)
Debug:
  1. Check file is not corrupted
  2. Try opening in native application
  3. Check PowerToys logs:
    %LOCALAPPDATA%\Microsoft\PowerToys\Logs
    
  4. Look for preview handler errors
Common issues:
  • File encoding not supported
  • Missing dependencies
  • File format variation not supported

See Also

Build docs developers (and LLMs) love