Skip to main content
SuperDoc treats DOCX as the real document, not an export target. Load a Word file, edit it in the browser, and export a Word file again. Tracked changes, comments, and complex tables all stay intact. HTML and Markdown are useful for AI-generated content; DOCX is the full-fidelity path. For the full reference, see Editor > SuperDoc > Import/Export.

Loading a document

Pass anything that looks like a document to the document option:
For HTML, Markdown, or JSON content, pair the alternate input with a base DOCX (used for styles):

Exporting

Default superdoc.export() triggers a browser download. To upload to your backend instead, ask for the raw Blob:
For HTML, JSON, or Markdown output, read directly from the active editor:

Format tradeoffs

DOCX preserves tracked changes, comments, complex tables, and section breaks. HTML and Markdown are structure-first: they don’t preserve Word-specific formatting.

What should I store in my backend?

Store the DOCX blob if you want full fidelity (recommended). Store JSON if you want programmatic search/diff and don’t need round-tripping with Word users. Don’t store HTML or Markdown unless you accept losing fidelity.

Common pitfalls

  • Duplicate downloads. superdoc.export() triggers a browser download by default. If you want to upload to a backend, pass { triggerDownload: false }: otherwise you get the file twice.
  • HTML import without a base DOCX. The html and markdown options need a document (a base .docx) for styles. Without one, headings and lists fall back to defaults.
  • HTML round-trips lose styling. Importing HTML, exporting DOCX, and then importing the resulting HTML back will not produce the original Word styling. For round-tripping, use DOCX or JSON.

Where to next