{"id":"image-vnd-dwg","mimeType":"image/vnd.dwg","name":"AutoCAD Drawing","shortName":"DWG","category":"CAD \u0026 Vector Graphics","extensions":[".dwg"],"description":"The image/vnd.dwg MIME type represents the DWG file format, a proprietary binary file format used for storing two- and three-dimensional design data and metadata. Maintained primarily by Autodesk, it is the native format for AutoCAD and one of the most widely used formats in the Computer-Aided Design (CAD), engineering, and architecture industries.","seo":{"title":"image/vnd.dwg MIME Type | Complete Developer Reference \u0026 Magic Bytes","description":"Complete reference for the image/vnd.dwg MIME type: magic bytes, software support, HTTP headers, developer snippets, and technical specifications for AutoCAD DWG files.","faqs":[{"question":"What is the difference between DWG and DXF?","answer":"DWG is a closed, proprietary binary format optimized for smaller file sizes and fast loading within AutoCAD. DXF (Drawing Exchange Format) is an open, ASCII-based (or sometimes binary) format designed for interoperability and sharing CAD data across different software applications."},{"question":"Can web browsers open DWG files?","answer":"No modern web browser natively supports the DWG format. To display DWG files on the web, developers must convert them to a web-friendly vector format (like SVG or PDF) on the server, or use a client-side WebGL/Canvas renderer like the Autodesk Forge Viewer."},{"question":"What are the magic bytes for a DWG file?","answer":"All DWG files begin with a 6-byte version string starting with 'AC10', which translates to the hex values 41 43 31 30. For example, AutoCAD 2018 files start with 'AC1032'."}]},"index":{"compression":["Proprietary Binary Compression (LZ77 based in newer versions)"],"browserSupport":{"score":1,"label":"None"},"commonUses":["Architectural Floor Plans","Mechanical Engineering Models","Civil Engineering Drafts","3D Product Designs"]},"technical":{"magicBytes":{"hex":"41 43 31 30 (AC10)","ascii":"AC10"},"container":"DWG Binary Container","compressionAlgorithm":["Proprietary (Autodesk ObjectDBX)"],"colorDepth":["Vector (True Color / Indexed AutoCAD Color Index)"],"transparency":true,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":false},"alphaChannel":true,"progressiveLoading":false,"hdrSupport":false},"history":{"developer":"Autodesk","released":"1982","specification":"Proprietary (Reverse-engineered by Open Design Alliance)"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"AutoCAD","logo":""},{"name":"Autodesk DWG TrueView","logo":""},{"name":"BricsCAD","logo":""},{"name":"DraftSight","logo":""},{"name":"FreeCAD (via ODA Converter)","logo":""}],"conversion":{"convertTo":["dxf","svg","step","png"],"convertFrom":["dxf","step","iges"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/vnd.dwg"}],"htmlAccept":"image/vnd.dwg, .dwg","fileDetection":["Check the first 4 bytes for the ASCII signature 'AC10' (Hex: 41 43 31 30)","Read the following two bytes to determine the specific AutoCAD version format (e.g., '15' for AutoCAD 2000, '32' for AutoCAD 2018)"]},"prosCons":{"pros":["The undisputed industry standard for 2D drafting and basic 3D CAD modeling","Highly optimized binary structure keeps file sizes relatively small compared to text-based CAD formats like DXF","Supports incredibly complex datasets including external references (XREFs), dynamic blocks, and extensive custom metadata"],"cons":["It is a closed, proprietary format, making it difficult for third-party developers to support fully without licensing the Open Design Alliance (ODA) SDK","Lacks native web or standard operating system previewer support","Format versions change frequently (roughly every 3 years), breaking backward compatibility for older CAD software"]},"specifications":{"url":"https://www.iana.org/assignments/media-types/image/vnd.dwg","rfc":"","mimeAliases":["application/acad","application/x-acad","application/autocad_dwg","image/x-dwg","application/dwg","application/x-dwg","drawing/dwg"]},"developerSnippets":{"python":"import magic\n# Note: Due to its proprietary nature, many magic databases identify DWG files with the generic 'application/x-dwg' or 'image/vnd.dwg'\nprint(magic.from_file('floorplan.dwg', mime=True))","nodejs":"const FileType = require('file-type');\nconst type = await FileType.fromFile('floorplan.dwg');\nconsole.log(type?.mime); // Usually outputs 'image/vnd.dwg' or undefined depending on the library version","go":"import \"net/http\"\n// Manually sniffing the DWG header:\n// isDWG := bytes.HasPrefix(buf, []byte(\"AC10\"))","php":"$mime = mime_content_type('floorplan.dwg');\necho $mime; // Resolves based on the server's magic.mime file configuration"},"relatedFormats":["dxf","svg"]}
