Media editor: build vs buy in the age of AI
Polotno

Developer tool

IDML to JSON converter

Convert an InDesign IDML file to structured JSON in your browser. Every page becomes a page of editable text, shapes, pictures and tables, with a preview and a list of import warnings.

Drop an IDML file here to convert it to JSON

or

Or a .zip of the InDesign package folder, to bring its linked images and fonts.

Runs entirely in your browser. Your file never leaves your device.

Quick answer

Drop an .idml, get JSON describing every page as editable elements, a rendered preview, and the warnings for anything the import approximated.

Formula: IDML → Polotno JSON (browser-only via @polotno/idml-import)

Drop an InDesign file and get it back as a design document in the Polotno design schema: one page per InDesign page, and every text frame, shape, picture and table as its own element with a position, a size and a style. The pages open in the live editor below the JSON, next to the list of what the import could not reproduce exactly.

The output shape

The JSON has a top-level width / height in pixels at 96 dpi, taken from the first page, a fonts array, and a pages array. Each page has a children array of typed elements: text, pictures, shapes, lines, tables and groups. A story threaded through several frames becomes one text element per frame. Hidden layers, non-printing layers and hidden items are left out.

Every element carries custom.idml with the InDesign id and object type it came from, so you can map a design element back to the source document. Master page items are copied onto each page that uses the master and are marked in the same field.

Links and fonts come from the package

An .idml contains neither its linked pictures nor its fonts. Dropped alone, pictures use the preview InDesign stored in the file, or a grey placeholder, and each case is reported as a warning. Drop a .zip of the folder that File > Package writes and the converter resolves each link by file name from Links and reads the fonts in Document fonts. Placed PDF, Illustrator and Photoshop files are converted into editable elements in a group.

Import warnings

The import succeeds even when InDesign uses something a browser canvas cannot draw the same way, and each difference is reported. The panel above the editor lists every warning with its code. The codes cover substituted and unreadable fonts, overset text, missing and unsupported graphics, and text, shape, effect and object features that were approximated. The full list is in the IDML import docs.

The same conversion in code

idml-to-json.ts
import { idmlToJson } from "@polotno/idml-import";

const json = await idmlToJson({
  idml: await file.arrayBuffer(),
  fonts: documentFontFiles, // the package's "Document fonts" folder
  resolveLink: async ({ name }) => linksFolder.get(name) ?? null,
  onWarning: (w) => console.warn(w.code, w.message, w.details),
});

// json is a Polotno design - load into a store, edit, re-export
import { createStore } from "polotno/model/store";
const store = createStore({ key: "YOUR_KEY" });
store.loadJSON(json);

Full API reference: IDML Import docs. The output follows the Polotno design format.

How it works

  1. Step 1

    Drop the .idml

    idmlToJson() unzips and parses the document in your browser. Nothing is uploaded.
  2. Step 2

    Read the JSON and the warnings

    One page per InDesign page, with typed elements at explicit coordinates. The warnings list names every feature that was approximated or dropped.
  3. Step 3

    Check the preview

    The pages open in the live Polotno editor, rendered from the same JSON. Copy or download the JSON when it looks right.

Frequently asked questions

Q: What does IDML to JSON give me?

A design document in the Polotno design schema: top-level width, height, unit and dpi, a fonts array, and a pages array with one page per InDesign page. Each page holds typed elements with explicit position, size and rotation. It is the object store.loadJSON() in the Polotno SDK accepts.

Q: Is this the raw IDML XML as JSON?

No. An IDML package is a set of XML files for spreads, stories, styles and swatches that reference each other. This converter resolves them into a flat design: styles are applied, master page items are placed, and every frame has its final position in pixels. It is meant for rendering and editing, not for writing IDML back.

Q: Can I trace an element back to InDesign?

Yes. Each element has a custom.idml field with the InDesign id and object type of its source, and items that come from a master page are marked as such.

Q: What are the import warnings?

Everything the importer approximated or dropped: a substituted font, a linked picture that is not available, text InDesign hides as overset, a text or shape feature drawn differently, a transparency effect that is not drawn. Each warning has a stable code and a message. When nothing was approximated, the panel says "No import warnings".

Q: Why is the JSON so large?

Pictures and fonts are inlined as data URLs, so the design loads with nothing else to fetch. A zipped InDesign package with full-resolution pictures gives a much larger JSON than the bare .idml. In your own app, have the importer upload each asset and write its URL into the design.

Q: What units and colors does the JSON use?

Pixels at 96 dpi, where one InDesign point is 96/72 px. The design takes the size of the first page, and a page of another size carries its own width and height. CMYK swatches stay CMYK, written as device-cmyk() colors.

Q: Can I convert an .indd file?

No. An .indd, .idms or .icml file is not IDML and is rejected. Save the document as IDML in InDesign (File > Save As) and convert that.

Q: Is my file uploaded?

No. The package is unzipped and parsed in your browser, and the JSON is built there. The only exception is the optional "Report issue" button, which sends the file only if you choose to.

Q: Is this the same as the @polotno/idml-import package?

Yes. This page is a UI on top of idmlToJson() from @polotno/idml-import, which runs in the browser and in Node.js 22.13 or newer. Install the package to run the same conversion in your own code.

Want this in your app? Embed Polotno SDK.

TRUSTED BY

100,000+

CREATORS

300+

BUSINESSES

ExpediaUnbounceLovePopPostGridPredis.ai