Free webp to jpg
DXF

Drawing Exchange Format

image/vnd.dxf Released 1982 · by Autodesk

The image/vnd.dxf MIME type represents the Drawing Exchange Format (DXF), an open CAD data file format developed by Autodesk in 1982. It was created to enable data interoperability between AutoCAD and other computer-aided design (CAD) programs. Unlike the proprietary DWG format, DXF is most commonly stored as an ASCII text file, making it human-readable and universally supported across the CAD, CNC machining, and laser cutting industries.

CAD & Vector Graphics Transparency Production Ready

Technical Specifications

MIME Type
image/vnd.dxf
Extensions
.dxf
Container
Text / Binary Container
Compression
Uncompressed (ASCII) & Uncompressed (Binary)
Algorithms
None
Color Depth
Vector (Indexed AutoCAD Colors / True Color)
Metadata
None
Capabilities
Transparency
Animation
Progressive Loading
Alpha Channel
HDR Support
Official Specification
Aliases: application/dxfapplication/x-autocadapplication/x-dxfimage/x-dxf

Magic Bytes & HTTP Headers

File Signature (Magic Bytes)
30 0D 0A 53 45 43 54 49 4F 4E (ASCII) / 41 75 74 6F 43 41 44 20 42 69 6E 61 72 79 20 44 58 46 0D 0A 1A 00 (Binary)
ASCII: 0\r\nSECTION (ASCII) / AutoCAD Binary DXF\r\n\x1a\x00 (Binary)
HTTP Headers
Content-Type: image/vnd.dxf
HTML Accept Attribute
accept="image/vnd.dxf, .dxf"

Browser Support Matrix

Browser Status Min Version
Chrome Chrome
Not Supported
Firefox Firefox
Not Supported
Safari Safari
Not Supported
Edge Edge
Not Supported
Internet Explorer Internet Explorer
Not Supported Legacy

Advantages & Limitations

Advantages
  • Universally supported by almost every CAD program, 3D modeler, and vector graphics editor in existence
  • ASCII structure is human-readable and can be parsed or generated programmatically with relative ease
  • The de facto standard for sending 2D cutting paths to CNC routers, plasma cutters, and laser engravers
Limitations
  • ASCII DXF files can be enormously large and inefficient compared to binary DWG files
  • The format relies heavily on legacy AutoCAD data structures, making complex 3D entity parsing extremely difficult for third-party developers
  • Lacks native web browser rendering capabilities

Developer Code Snippets

import magic
# Libmagic may identify ASCII DXF files simply as 'text/plain'.
print(magic.from_file('layout.dxf', mime=True)) # May output 'text/plain' or 'image/vnd.dxf'
const fs = require('fs');
// Simple ASCII DXF sniff reading the first few lines
const buffer = Buffer.alloc(256);
const fd = fs.openSync('layout.dxf', 'r');
fs.readSync(fd, buffer, 0, 256, 0);
fs.closeSync(fd);
const content = buffer.toString('utf8');
const isDxf = content.includes('SECTION') && content.includes('HEADER');
console.log(isDxf);
import (
    "bytes"
    "net/http"
)
// Binary DXF check
// isBinaryDXF := bytes.HasPrefix(buf, []byte("AutoCAD Binary DXF\r\n\x1a\x00"))
$mime = mime_content_type('layout.dxf');
echo $mime; // Standard setups may resolve this to 'text/plain' for ASCII DXF files

File Detection Steps

How to programmatically detect a image/vnd.dxf file by reading its raw bytes:

  1. 1 For ASCII DXF, check the beginning of the text file for the sequence '0' followed by a newline and 'SECTION'. (Note: some DXF files may begin with '999' comment codes).
  2. 2 For Binary DXF, check the first 22 bytes for the exact sentinel string 'AutoCAD Binary DXF\r\n\x1a\x00'.

Software Support

A
AutoCAD
L
LibreCAD
F
FreeCAD
I
Inkscape
Q
QCAD

Conversion Tools

Share & Embed

Markdown Badge
DXF Format Badge
[![DXF Format](https://freewebptojpg.com/mime/image/dxf/badge.svg)](https://freewebptojpg.com/mime/image/dxf)
Interactive iframe Widget
<iframe src="https://freewebptojpg.com/mime/image/dxf/embed" width="100%" height="280" style="border:1px solid #cbd5e1;border-radius:8px;" title="DXF Specs"></iframe>

JSON API

All data on this page is available as a free, open JSON API. Use it in your project, documentation, or tooling.

GET https://freewebptojpg.com/mime/image/dxf.json Open JSON
Free to use
No auth required
CORS enabled
Use from any domain
Cached 24h
Cache-Control headers set

Frequently Asked Questions

What is the difference between DXF and DWG?

DWG is Autodesk's proprietary, binary format optimized for performance and smaller file sizes within AutoCAD. DXF is an open format (primarily ASCII text-based) designed specifically for sharing CAD data across different software applications and manufacturing hardware (like CNC routers).

Is a DXF file a text file or a binary file?

DXF can be both, but it is overwhelmingly encountered as an ASCII text file. The text format consists of grouped codes and values. Autodesk also defined a Binary DXF format that is more compact, but it is rarely used compared to standard ASCII DXF or DWG.

Can I display DXF files in a web browser?

No. Web browsers cannot natively render DXF files. To display a DXF in a web application, developers typically convert it to SVG on the backend or use specialized client-side JavaScript libraries to parse the DXF geometry and render it onto an HTML5 <canvas>.

Related Formats

Share this format