Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>AutoCAD DWG & DXF PreviewerNew to Visual Studio Code? Get it now.
AutoCAD DWG & DXF Previewer

AutoCAD DWG & DXF Previewer

bumkom

|
730 installs
| (2) | Free
| Sponsor
View AutoCAD DWG and DXF drawings inside VS Code — no AutoCAD needed. Open .dwg and .dxf files instantly with pan, zoom, layer control and SVG/PNG export.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AutoCAD DWG & DXF Previewer for VS Code

Open any .dwg or .dxf drawing straight in VS Code. No AutoCAD. No license. No conversion step.

Someone sends you a DWG file. You don't have AutoCAD — or you do, but launching it just to glance at a floor plan is absurd. Install this extension, double-click the file, and the drawing opens in your editor: pan it, zoom it, turn layers on and off, flip between sheets, export it as an image.

Works fully offline on Windows, macOS and Linux. Your drawings never leave your machine.

☕ Free, open source, and kept up to date by one developer. If it saved you an AutoCAD launch or a license, please consider supporting it: Buy me a coffee — every coffee keeps the updates coming.

Buy me a coffee

A multi-sheet architectural drawing open in VS Code: the floor plan seen through its viewport, with the title block and legend around it


Why people install it

You received a DWG or DXF and can't open it. No AutoCAD license, no trial signup, no sketchy "free online DWG viewer" that wants you to upload a client's floor plan to a random server.

Your repository contains CAD files. Site plans, panel layouts, machine drawings — review them during a pull request without leaving the editor or asking someone to export a PDF.

You just need to check one thing. A dimension, a room label, which layer something sits on. Ten seconds instead of a five-minute application launch.

You're a developer working with CAD data. Inspect the drawings your code parses, right next to the code that parses them.


What you get

The Quantities panel: every layer with its colour, object count, length, area and hatch area, converted to feet, with a bold total

All 57 doors of a floor plan highlighted after picking the DOOR row in Quantities

Find (Ctrl+F) zoomed onto the LOBBY label, with the inspector showing its layer, handle and position

  • Instant preview — double-click a .dwg or .dxf file, that's the whole workflow
  • DXF opens with no conversion at all — DXF is the format this extension reads natively, so those files skip straight to rendering
  • Pan and zoom — scroll to zoom toward the cursor, drag to pan, double-click to fit
  • Layer control — show or hide any layer, with an entity count for each
  • Find (Ctrl+F) — search text, attributes (part numbers, door tags — hidden ones too), block names, layers and object types across every sheet; jump from hit to hit with Enter
  • Click to inspect — click any line of a block to select the whole block and see its layer, position, rotation, scale and attributes
  • Quantities — count every block (Door-900 × 14) and measure linework and area per layer, in the units the drawing declares (or the one you pick, when it declares none); shift-click a few objects to add up their length and area, and copy the table straight into a spreadsheet
  • Measure — click two points to read the distance between them and its ΔX / ΔY; clicks lock onto corners, so the number is exact
  • Readable on a dark canvas — colours drawn for white paper (dark red, navy, black) are lightened just enough to stand out
  • Compare drawings — Compare with HEAD (Git), Compare with File… or two selected files: added objects in green, removed in red, changed in yellow over their old shape, with a list of every change to step through (F7)
  • Multi-sheet drawings — switch between Model Space and every Paper Space layout
  • Export to SVG or PNG — drop a drawing into a document, ticket, or chat
  • Live reload — the view refreshes when the file changes on disk, keeping your sheet, layers and zoom
  • Dark canvas — drawings are shown on a dark background, as in AutoCAD
  • Fast on big drawings — a 45,000-entity site plan opens in about two seconds, and reopening it is instant

Quick start

  1. Install the extension
  2. Open a .dwg or .dxf file
  3. There is no step 3

Nothing to configure. No converter to install. No account.


FAQ

Do I need AutoCAD installed? No. The DWG reader is built into the extension.

Which AutoCAD versions are supported? R14 through 2020 and later (AC1014 – AC1032).

Can I edit drawings? No — this is a viewer. Your files are opened read-only and are never modified.

Are my files uploaded anywhere? Never. Everything runs locally inside VS Code, and it works with no internet connection.

Does it work with DXF files? Yes. .dxf files open directly and skip the conversion step entirely, so they load faster than DWG. ASCII DXF is supported; binary DXF is not, and says so clearly instead of opening blank.

What if a file has the wrong extension? The format is detected from the file's own header, not its name, so a DWG saved as .dxf still opens correctly.

Is 3D supported? This is a 2D viewer. 3D drawings open, but solids are not rendered; 3DFACE geometry appears as wireframe.

A drawing looks incomplete — why? The toolbar shows a banner naming every entity type in the drawing that this viewer can't draw yet — LEADER, MULTILEADER, TABLE, WIPEOUT and 3D solids are the common ones. Objects hidden in the file itself — invisible attributes, hidden dynamic-block states — are left out on purpose, as in AutoCAD. Please report drawings that look wrong.


What it can draw

Geometry LINE · CIRCLE · ARC · POLYLINE · LWPOLYLINE · SPLINE · ELLIPSE
Fills SOLID · HATCH
Text TEXT · MTEXT · ATTRIB — with fonts, alignment and rotation
Blocks INSERT — nested, rotated, mirrored, scaled, and grid arrays (mirrored arcs, circles, polylines, text and hatches too)
Dimensions DIMENSION — drawn as AutoCAD laid it out: dimension and extension lines, arrowheads, text
Other POINT · 3DFACE · viewports on paper-space sheets

Layers keep their colors and linetypes from the original drawing; line weights set directly on an object are kept too. Layers switched off in a DXF start hidden.


Ask AI about your drawing

Let an AI agent read the drawing you have open, so you can ask "how many doors are on this plan?" or "what size is the largest room?" and get an answer from the drawing itself instead of counting by eye.

Press Ask AI on the toolbar to connect an agent.

What an agent can do

  • Read the drawing: overview (sheets, layers, block counts), text search, and dimensions — counts, sizes and notes
  • Count and measure: how many of each block, length and area per layer, and distances or room areas measured from the geometry when no dimension is drawn
  • Highlight and zoom in the preview, so you can see what it is talking about
  • Take a snapshot of the view (or a region) to look at it

Vietnamese text in the old TCVN3 fonts (.Vn*) now displays correctly in the preview and for the agent.

Setup

Agent How
Claude Code Run DWG: Connect AI Agents… (or accept the prompt the first time you open a drawing; it only appears when Claude Code is installed). This runs claude mcp add for you and registers the server as dwg-previewer.
GitHub Copilot Automatic on VS Code 1.101 or newer. The tools appear in Copilot Chat agent mode; the first use in a session may take a moment while the server starts.
Other agents Run DWG: Connect AI Agents… and copy the URL and the Authorization header. Add them to the agent's MCP settings; the config format differs per agent, see its MCP documentation.

Which files an agent can read. Drawings in your workspace folders and drawings open in a preview are free. Any other .dwg / .dxf needs your click on a modal Allow prompt first.

Settings

Setting Description Default
dwgPreviewer.ai.enabled Run the local server that lets AI agents read drawings. It starts the first time you open a drawing, connect an agent or Copilot asks for it. Off: the server stops and nothing new is cached; DWG: Clear Drawing Cache removes drawings cached earlier. true
dwgPreviewer.ai.port Local port of the server (127.0.0.1 only). If another program uses it, you are told once and AI features stay off until you pick another port. 45131

Limits. It works only while VS Code is open — the server lives inside the extension.

Privacy. The extension itself sends nothing anywhere. When your agent calls a tool, the drawing text, numbers and snapshots it asks for go to the AI model you chose for that agent, and only then. Agents normally ask before calling a tool. The server listens on 127.0.0.1 and requires a token. Note: Connect passes that token to claude mcp add on its command line, so other local processes could see it while that command runs.


Settings

Nothing is required. dwgPreviewer.converterPath lets you point at an external converter for unusual files — almost nobody needs it. The AI settings are listed under Ask AI about your drawing.


Found a problem?

Open View → Output and select DWG Previewer to see exactly what happened during conversion, then open an issue on the repository with that log and, if you can share it, the drawing.


More extensions by bumkom

Extension What it does Highlights
📐 CAD DXF Previewer Preview 2D DXF drawings in VS Code Opens the drawing instead of raw text
📝 Markdown Markdown Viewer Premium Markdown preview and export to PDF, Word and HTML Mermaid · PlantUML · Graphviz · KaTeX math · Jira & Backlog markup · Obsidian callouts and wiki links · offline
📝 Markdown Markdown Viewer Lite (Pele) Fast, lightweight Markdown preview TOC · in-page search · syntax highlighting · Pele-powered Mermaid diagrams · HTML/PDF export
🤖 AI coding Bumeter — AI Coding Token Usage See where your Claude Code, Kiro and OpenCode tokens go Quota and reset times · what consumed the quota · conversations ranked by tokens · skill costs · local only
🤖 AI coding Claude Code Usage Claude Code quota and context size in the status bar 5-hour and weekly quota · reset countdown · alerts at 80 % / 90 % · usage analytics · local only
🤖 AI coding Claude Code Skills Manager Install, enable, disable and remove Claude Code skills Install from skills.sh, git or a folder · token cost per skill · skills leaderboard · undo and trash recovery

Support the project

The extension is free and stays free. If it saved you an AutoCAD launch or a license, buy me a coffee ☕ — it keeps the updates coming.


Not affiliated with, endorsed by, or sponsored by Autodesk. AutoCAD, DWG and DXF are trademarks of Autodesk, Inc., used here only to describe the file formats this extension reads.


License

Open source under GPL-3.0-or-later. DWG reading is powered by GNU LibreDWG (via @mlightcad/libredwg-web, GPL-3.0).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft