CoordCalc

DXF Coordinate Extractor

A DXF is a drawing file, but to a surveyor it is usually a list of coordinates wearing a drawing's clothes. Drop an ASCII DXF here and it lists every point, line, polyline, circle and arc it finds, with the layer, the vertex count, the length, the enclosed area of anything closed, and the drawing unit the file declares. The vertices can then be written out as CSV for a spreadsheet or another calculator. The file never leaves your browser.

ASCII DXF, R12 and laterRuns entirely in the browserUpdated 9 October 2026

Open a DXF

Or paste the file contents below. Binary DXF is not supported — save the drawing again as an ASCII DXF and it will read.

How a DXF stores coordinates

A DXF is not a binary blob. It is a text file of tagged pairs: a line holding a group code, then a line holding the value for that code. Group code 10 is an X coordinate, 20 is its Y, 8 is the layer name, 0 starts a new entity. Read the file two lines at a time and the drawing falls out of it.

0 LWPOLYLINE 8 PARCEL ← layer 90 4 ← four vertices 70 1 ← closed 10 0.0 ← X of vertex 1 20 0.0 ← Y of vertex 1 10 100.0 ← X of vertex 2 …

The file is divided into sections. HEADER holds the settings, including the drawing unit; TABLES holds the layer definitions; ENTITIES holds the geometry itself. This extractor reads ENTITIES, and looks in HEADER only for the unit.

What it reads, and what it does with it

EntityWhat it isLengthArea
POINTA single coordinate——
LINEA straight segment between two pointsSegment length—
LWPOLYLINEA light polyline: many vertices, optionally closedSum of segmentsShoelace area when closed
POLYLINE + VERTEXThe older, heavier polyline, one VERTEX entity per pointSum of segmentsShoelace area when closed
CIRCLEA centre and a radiusCircumferenceπr²
ARCA circular arc from a start angle to an end angler×Δθ—
INSERTWhere a block is placed——

Everything else — text, dimensions, hatches, attributes — is counted but not measured, since it carries no coordinate geometry worth summing. Knowing that a file produced 412 unsupported entities is often the fastest way to work out why a drawing looks empty when it is opened somewhere else.

Two behaviours are worth stating plainly, because both change an answer. A polyline's bulge value makes one segment into a true arc; this extractor ignores bulges and measures the chord instead, so a boundary drawn with curved segments will come back slightly short. And an ellipse, spline or leader is not measured at all — if a boundary was drawn with splines, flatten or explode it in the CAD package before exporting.

The unit question

A DXF stores plain numbers. It does not say whether 100.0 is a hundred metres, a hundred feet or a hundred millimetres — it records that in one header variable, $INSUNITS, and nothing forces anybody to set it. The drawing unit reported above comes from that variable, and when it is missing or zero the extractor says so rather than guessing.

$INSUNITSUnit$INSUNITSUnit
0Unitless — not stated6Metre
1Inch7Kilometre
2Foot10Yard
3Mile14Decimetre
4Millimetre17Gigametre
5Centimetre21US survey foot

Where the unit is known, the area of every closed entity is converted as well, so a parcel drawn in metres can be read straight off in hectares and acres. Where it is not, the raw squares are all you get — which is the honest answer, because a unitless number of square units is not a number of anything.

Before you rely on a DXF area, check the unit against something you know. A lot-size, a road width, a boundary length you can recognise — one familiar figure settles the question faster than any header, and a wrong unit is by far the most common reason a DXF area comes back ten thousand times too small.

A worked example

The sample parcel loaded by the button above is a closed polyline with four vertices on layer PARCEL: (0, 0), (100, 0), (100, 50) and (0, 50), with $INSUNITS set to 6 for metres. The extractor reports a perimeter of 300.000 m and an enclosed area of 5,000.000 m², which is 0.500 ha or 1.2355 acres, along with a control point, a 100 m set-out line and a tank circle of radius 10 m. Those four numbers can be checked by hand in less time than it takes to read this paragraph — which is the point of including them.

The same four coordinates pasted into the land area calculator return the identical 5,000 m², which is a useful way to confirm that a drawing and a calculation agree before either is relied on.

Further reading

Frequently asked questions

What is a DXF file?

DXF, Drawing Exchange Format, is AutoCAD's documented interchange format for drawings — a plain-text file, or in one variant a binary one, of tagged pairs: a group code followed by a value. Almost every CAD package can write one, which is why it is usually the easiest way to get geometry out of a drawing and into something else.

How do I get coordinates out of a DXF file?

Open the DXF here, or paste its text into the box. The extractor reads the ENTITIES section, lists every point, line, polyline, circle and arc with its layer, vertex count, length and closed area, and writes the vertices to a CSV you can open in a spreadsheet.

Why is my DXF area wrong?

Almost always a unit question. A DXF stores plain numbers and records the unit only in the header variable $INSUNITS. If that is missing or zero the drawing is unitless, and the same numbers can be millimetres, metres or feet depending on who produced the file. Check the unit against something you recognise before trusting an area.

Does this work with binary DXF files?

No. Binary DXF starts with the sentinel AutoCAD Binary DXF and stores the same group codes in a compact binary form. Save the drawing again as an ASCII DXF — most packages offer both in the save dialog — and it will read.

Are blocks and external references included?

Only as their insertion point. The extractor reads the top-level ENTITIES section, so geometry inside a block definition appears where the block is inserted as a single point rather than expanded. External references are not part of the file at all.

Which DXF entities are read?

POINT, LINE, LWPOLYLINE, POLYLINE with its VERTEX entities, CIRCLE and ARC. Text, dimensions, hatches and attributes are skipped because they carry no coordinate geometry worth measuring, and unsupported entities are counted so a file that behaves unexpectedly can be diagnosed.

How is the area of a polyline calculated?

By the shoelace formula on the vertices, exact for any polygon whose edges do not cross. Only polylines flagged as closed are given an area, and a vertex's bulge value, which makes a segment a true arc, is ignored, so a curve segment is measured as the straight chord between its ends.

Is the DXF uploaded anywhere?

No. The file is read with the browser's own file reader and parsed in JavaScript on the page. Nothing is sent to a server, which matters when the drawing describes a client's site.

CoordCalc publishes free surveying and coordinate calculators. Results are for reference — confirm against the governing standard before construction or procurement. About · Privacy & cookies · Terms of use · Developers