Comparison · DWG to Image vs DWG to JSON

An image gives you pixels. JSON gives your software the geometry.

Both conversions start from the same DWG file, but they serve completely different purposes. An image is for display. JSON is for processing. Knowing which output you need — and when you need both — determines what kind of tool your product should call.

Join the beta · Free 50/mo →Read the docs
01WHAT EACH OUTPUT IS

Pixels vs structured data.

DWG to image renders the drawing geometry onto a raster canvas and saves the result as a PNG, JPEG, or TIFF. The output is a flat grid of colored pixels. It is useful for displaying a thumbnail, embedding a preview in a PDF report, or giving a non-CAD user a visual reference. It is not useful for any downstream software processing.

DWG to JSON reads the binary DWG format and emits a structured description of every entity in the drawing: its type, coordinates in native drawing units, layer membership, color, and bounding box. The output is machine-readable data your code can query, filter, measure, and transform.

02OUTPUTS COMPARED

A direct comparison.

CapabilityDWG to ImageDWG to JSON (CADLens)
Output formatPNG / JPEG / TIFFJSON (vectorJson, layersJson, metadata)
Drawing units preservedNo — pixels onlyYes — native units per entity
MeasurementsNot recoverableAvailable on every entity
Layer informationLost on renderlayersJson: name, colorHex, entityCount
Entity filteringNot possibleFilter by layer, type, color in code
AutomationDisplay onlyFull — parse, measure, classify, export
Search / indexingNot possibleIndex entity text, count by layer, etc.
Preview imageYesYes — imageUrl returned alongside JSON
03LIMITS OF IMAGE-ONLY

What you lose when you render and stop.

An image conversion is a one-way street. The moment the DWG is rendered to pixels, the structural information in the file is gone:

  • No measurements. A pixel has no real-world size. You cannot determine that a wall is 4.5 metres long or a bolt hole is 12 mm in diameter from a PNG.
  • No layer structure. Layers in a DWG file carry intent — architectural, structural, electrical. A flat image collapses all layers into one surface with no way to distinguish them.
  • No entity classification. Whether a line is a wall, a road edge, or a pipe run is encoded in the layer and block names. That information does not survive in pixels.
  • No text extraction. Annotations, part numbers, and dimension labels in a DWG are searchable text entities. In a rendered image they are just dark shapes on a background.
  • No automation. You cannot write code that counts door entities, sums cable lengths, or filters structural elements from an image without expensive computer vision work.
04WHAT JSON UNLOCKS

Data that software can actually use.

The CADLens vectorJson opens up a category of features that are simply not possible from an image:

  • Automated measurement. Calculate total polyline length (cable runs, pipe lengths, perimeter), area of closed regions, or count of circular entities (bolt holes, columns).
  • Layer-based filtering. Show only the structural layer. Strip annotation layers before displaying to clients. Count entities per discipline.
  • BOM and take-off generation. Identify block inserts by name, aggregate counts, and export a bill of materials — all without a human reading the drawing.
  • Search and indexing. Extract all text entities from a drawing library and make them full-text searchable. Find drawings that reference a specific part number.
  • Downstream export. Feed the vector data into quotation engines, GIS systems, or custom rendering pipelines that need real coordinates, not pixels.

The metadata object adds drawing-level context: units (millimetres, inches, etc.) and the overall bounding box ({ width, height }) so downstream code knows the coordinate space.

05CADLENS RETURNS BOTH

One parse call. JSON and an image.

CADLens is a parser, but it also renders a PNG from the same parse run. You do not have to choose. A single POST /v1/parse call returns a job_id. When the job reaches COMPLETED, the result from GET /v1/jobs/{job_id}/result includes:

  • vectorJson — every entity with coordinates, layer, color, and bounding box.
  • layersJson — layer names, colorHex, and entityCount.
  • metadata — units and drawing extents.
  • imageUrl — a signed URL to the rendered PNG preview, ready to display.

Display the PNG in your UI and process the JSON in your backend — from one API call, with no separate rendering step and no additional infrastructure.

06 — FAQ

Common questions.

No. Once a DWG is rendered to a raster image (PNG, JPEG, TIFF), the original coordinates and drawing units are gone. You have pixels with an arbitrary scale, not millimetres or inches. To recover measurements you would need to re-digitise the drawing manually or use a parser like CADLens to extract the data before rendering.

Every entity in the drawing — polylines, arcs, circles, splines, text annotations, hatches, and block inserts — each described with its coordinates in native drawing units, layer name, color, and bounding box. Schema version 2024-01.

Yes. Every parse job returns an imageUrl — a signed URL to a rendered PNG of the drawing. You get the visual and the structured data from the same API call.

An array of layer objects, each with name, colorHex, and entityCount. This lets you filter the vectorJson by layer, toggle layer visibility in your UI, or report which layers carry the most content.

DXF and DWF are stable and production-ready alongside DWG. PDF (vector), DWFx, and DGN V7 are in beta.

POST /v1/parse uploads your file and returns a job_id immediately. Poll GET /v1/jobs/{id} or provide a webhookUrl on the request to be notified on completion. Fetch results from GET /v1/jobs/{id}/result and the preview from GET /v1/jobs/{id}/image. Files under ~2 MB support wait=true for a synchronous response.

Free tier: 50 parses per month. Paid plans: Starter $19/mo (1,000 parses), Builder $49/mo (5,000 parses), Growth $99/mo (25,000 parses), Scale $249/mo (100,000 parses). Enterprise pricing is custom. Only successful parses are billed.

JOIN THE BETA

Get an API key. Parse your first drawing today.

Free tier includes 50 parse requests per month. No credit card required.

Join the beta · Free 50/mo Read the docs
— RELATED

Keep reading.