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.Documentation Index
Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
Use this file to discover all available pages before exploring further.
Loading a document
Pass anything that looks like a document to thedocument option:
Exporting
Defaultsuperdoc.export() triggers a browser download. To upload to your backend instead, ask for the raw Blob:
Format tradeoffs
| Format | Round-trip fidelity | Use it for |
|---|---|---|
| DOCX | Full | Real Word documents: open in Word with nothing lost |
| JSON | Full | Programmatic control, AI/agent input/output |
| HTML | Structure only (no CSS) | Web content, AI-generated HTML |
| Markdown | Structure only | Documentation, simple AI input |
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
htmlandmarkdownoptions need adocument(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
- Editor > SuperDoc > Import/Export: full API reference (every option, every export flag)
- Editor > SuperDoc > Configuration:
document,html,markdown,jsonOverrideconfig - Editor > SuperDoc > Methods:
superdoc.export(),getHTML(),getJSON(),getMarkdown() - Document Engine: server-side import/export via SDKs and CLI
- Editor > Collaboration > Storage: persistence patterns for collaborative docs

