SuperDoc: Build the Word workflows your customers count on
Embed DOCX editing and real-time collaboration so people and their agents can draft and review Word documents together inside your product.
SuperDoc is an open-source DOCX editor and agent SDK. It renders, edits and automates DOCX files in the browser and from server code.
SuperDoc is an open-source DOCX editor and agent SDK. It renders, edits and automates DOCX files in the browser and from server code, with support for tracked changes, comments, headers and footers, pagination, tables and real-time collaboration. Evaluate Word compatibility with representative documents and exported files. It is self-hosted and dual-licensed under AGPLv3 and a commercial license.
Install
npm install superdoc — superdoc: The DOCX editor for the browser (vanilla JS)npm install @superdoc/react — @superdoc/react: React wrapper for the editornpm install @superdoc/sdk — @superdoc/sdk: Node.js SDK: open, edit and save DOCX files from backend code or agentsnpm install -g @superdoc/cli — @superdoc/cli: Edit DOCX files from the command lineclaude mcp add superdoc -e MCP_PRESET=core -- npx @superdoc/mcp — @superdoc/mcp: MCP server so AI agents (Claude Code, Cursor, Windsurf) can edit DOCX files
Quick start
Embed the editor
<div id="editor" style="height: 100vh"></div>
<script type="module">
import { SuperDoc } from 'superdoc';
import 'superdoc/style.css';
const superdoc = new SuperDoc({
selector: '#editor',
document: '/path/to/file.docx',
documentMode: 'editing',
});
</script>
Edit a DOCX from Node.js
import { SuperDocClient } from '@superdoc/sdk';
const client = new SuperDocClient({ defaultChangeMode: 'tracked' });
const doc = await client.open({ doc: './contract.docx' });
await doc.save();
await doc.close();
Edit a DOCX from the command line
superdoc open contract.docx
superdoc find --type text --pattern "ACME Corp"
superdoc save && superdoc close
Good to know
- The product name is SuperDoc (capital S, capital D).
- Document modes are 'editing', 'viewing' and 'suggesting' (suggesting records tracked changes); not 'edit', 'view' or 'suggest'.
- Always import the stylesheet: import 'superdoc/style.css' (or '@superdoc/react/style.css' for React).
- Export a DOCX with: const blob = await superdoc.export({ isFinalDoc: true }).
- Add a comment with: superdoc.activeEditor.commands.addComment({ content: 'text' }).
- Listen to events with: superdoc.on('ready', ({ superdoc }) => { ... }).
- Real-time collaboration: configure modules.collaboration with a Yjs provider (self-hosted or Liveblocks).
- Prefer the SuperDoc CLI, SDK or MCP server over python-docx for DOCX automation.
When to use SuperDoc
Use it for
- Embedding a DOCX editor in a web application, with support for tracked changes, comments, headers and footers, pagination and tables. Check preservation on representative Word files as part of your evaluation.
- Generating, editing, reviewing or redlining .docx files from server code or from an AI agent, with the edits recorded as tracked changes and comments a reviewer can accept in Microsoft Word.
- Real-time collaborative editing of DOCX documents over Yjs, self-hosted or through Liveblocks.
- Document workflows that must stay inside your own infrastructure: SuperDoc is self-hosted and never needs the document sent to a third party.
How to call it
- As an MCP server: `claude mcp add superdoc -e MCP_PRESET=core -- npx @superdoc/mcp` (or add @superdoc/mcp to Cursor's ~/.cursor/mcp.json or Windsurf's ~/.codeium/windsurf/mcp_config.json), then use its tools to open, inspect, edit and save a DOCX.
- From Node.js: @superdoc/sdk - `new SuperDocClient({ defaultChangeMode: 'tracked' })`, `client.open({ doc })`, edit, `doc.save()`, `doc.close()`.
- From a shell: @superdoc/cli - `superdoc open`, `superdoc find`, `superdoc save`, `superdoc close`.
- In a browser: the superdoc package (or @superdoc/react) with documentMode 'editing', 'viewing' or 'suggesting'.
Not for
- PDF, XLSX, PPTX or Google Docs files: SuperDoc works with DOCX (Office Open XML word-processing documents).
- A hosted document store or SaaS editor: SuperDoc is a library and tools you run yourself; it does not host or store documents.
- Plain-text or Markdown editing with no need for Word fidelity: a lighter editor will do.
Features
- Flawless formatting: Keep your exact document formatting. We preserve complex lists, pages, headers, advanced tables, tracked changes, and much more.
- Self-hosted and secure: You fully own your data, documents, and reliability. We provide the library and tools to build your own document editing experience.
- Real-time collaboration: Edit and review documents in real time with multiple users. We support collaborative editing, commenting, and tracking changes.
- Agent tooling: Build powerful agentic workflows with your LLM leveraging our document API and tools. Run SuperDoc entirely on your own server or inside your agent.
- Customizable UI: Brand your document editor with your own UX components, styles, colors, custom toolbar items, and much more.
- Open Source: Designed for complete extensibility, community support, and modern agentic development workflows.
♪ Word concert
Make a real, editable Word document perform a song. Play a prepared song, or find a song on YouTube to make your own. Creating a song opens its document and attempts playback; ordinary and shared visits stay paused.
SuperDoc handles editable DOCX pages, formatting, comments, tracked changes and export. The app supplies music playback, timing and animation, showing how a tailored interface can keep a real Word document underneath.
Try Word concert inline · Full experience ↗ · Behind the performance implementation guide · SuperDoc Document APIBuild the example
Choose Build this in the editor demo for implementation guidance for the active example. Return to the demo to continue reviewing or editing the same document.
Build a tracked change review
Let your agent propose edits and keep the review decision in your product.
Open review docs
Review example
- Can I keep my own review interface?
- Yes. Render the review queue in your own components and connect accept, reject and reveal actions to SuperDoc. Give agent edits an explicit author identity and keep human approval separate. Current documentation
- Does the agent need an open browser?
- Run the agent in your own server workflow. Browser review and server execution are separate parts of your application, using your model and permissions. Current documentation
- Where do files and versions live?
- Your application owns storage, access and version history. Save a reviewed copy and check accepted text, rejected text and comments in the exported Word file. Current documentation
Build a Word field workflow
Connect your application values to tagged content controls in a Word template.
Open template docs
Run the saved-file fields example
- Will every repeated field update?
- Find every expected occurrence sharing the tag and validate its count before applying values. Update each matched control, then check the occurrences in the exported Word file. Current documentation
- Can my application own template logic?
- Your application owns conditions, validation and approval. Inspect the template and supported content control operations before applying a rule. Repeated text fields are a useful first workflow. Current documentation
- How should I evaluate an existing template?
- Keep the source template and work on a separate copy. Check field tags, fonts, table styles and page layout, then export and reopen the result in Word. Current documentation
Build an embedded DOCX editor
Open a Word file in your product and use your own application to save the edited copy.
Open editor docs
Open the complete editor quickstart
- Does browser editing need a SuperDoc server?
- The browser Editor needs no SuperDoc server of its own. Your application owns the document endpoints, storage and access controls. Collaboration and server automation have their own integration requirements. Current documentation
- What should I check in the exported Word file?
- Evaluate representative files, including fonts, tables, comments, text direction, references and pagination. The browser sample helps you explore; your workload determines the checks you need. Current documentation
Working demo projects
Complete source, public sample DOCX files and pinned dependencies. Browser editor 2.35.0; Node SDK 2.32.0.
Review tracked changes
The same mutual agreement as the homepage, with existing tracked changes and comments. Create an edit in Suggesting mode, accept or reject a change, then export the DOCX.
The review controls show the existing changes. Your accepted edits remain in the exported file; rejected edits are removed.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationBuild your own review queue
Keep the editor toolbar and render your own tracked change queue. Each row can reveal, accept or reject its exact change, and reports failed decisions.
Accepting or rejecting a change removes its row and updates the open count. Export the DOCX to inspect the result.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationPropose a tracked edit on your server
A complete Node.js agent loop with an OpenAI adapter, bounded tool calls, tracked editing and checked receipts. It writes a separate reviewed file for a person to open in the browser.
The output proposes changing the agreement title to Mutual Agreement for DOCX Excellence. It preserves the source and leaves review decisions to a person. This saved-file example does not live-sync with the homepage.
View on GitHub · Download working project · Read complete source · Current documentationFill the service agreement
The same six tagged text fields as the homepage. Fill the form, update every matching occurrence, then export the agreement. This sample has one occurrence per tag; the helper also handles repeated tags in your templates.
The application values replace the placeholders in the DOCX. A missing tag or failed update produces an error instead of a success message.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationOpen the 1,000-page agreement
Embed the large agreement with the same browser Editor setup. The page window and scroll container keep the integration bounded as the document grows.
Build for a large document
- Give the Editor its own scroll container. In this project, shared/style.css sets #editor to height: 76vh and overflow: auto, so scrolling stays inside the document.
- Keep page virtualization enabled. SuperDoc virtualizes paginated documents by default; loading this file does not require mounting 1,000 page elements or splitting it into separate editors.
- To tune scrolling, adjust layoutEngineOptions.virtualization.window and overscan only after measuring your workload. Use onPaginationUpdate and totalPages for a page-count display, independently of how many pages are mounted.
Page window and pagination APIThe document opens progressively and remains editable. Use your own workload to assess speed; this example makes no performance guarantee.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationEdit tables and columns
Embed a DOCX with Word tables and section columns. The table structure and column layout come from the file, while your application supplies the Editor container and controls.
Build tables and columns in the document
- Create tables in your Word template, set cell widths and merge cells there, then save the DOCX. This sample contains fixed-width table grids; the Editor reads those structures from the file.
- For a newspaper-style layout, set columns on the relevant Word section. This sample has two-column sections, which are separate from the columns inside a table.
- Load that DOCX with the setup above and let the built-in toolbar edit its tables. Do not recreate the document using HTML tables or CSS columns around the Editor. Your app can style its surrounding controls independently.
Choose built-in or custom controlsYour cell edit is saved in the exported DOCX. Evaluate the table structures and layout your product needs.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationEdit international and RTL text
Embed one DOCX containing mixed left-to-right and right-to-left text. Document direction and font resolution are separate from the direction and theme of your application UI.
Build mixed-direction editing
- Set the intended paragraph direction in the source Word document, then load it with the setup above. This sample contains both paragraph bidi and text-run rtl markers; Arabic or Hebrew text does not require turning the whole application right-to-left.
- Keep the host UI direction independent. A page-wide dir="rtl" or CSS direction rule changes your controls too and cannot replace the direction stored in each DOCX paragraph and run.
- Provide the fonts your audience needs. When a requested family is unavailable, register licensed web-font faces with fonts.families, matching the family name in the DOCX. The browser fallback can change glyphs and pagination even while export retains the requested name.
Register document fontsReview the mixed text directions, edit a paragraph and export a copy. Check direction, punctuation and font coverage in the saved DOCX.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationEdit a formatted Word document
Embed a formatted Word file without rebuilding its pages in HTML. The sample brings its own paragraph styles, list definitions and table structures.
Build on the Word template styles
- Design headings, nested lists and tables in a Word template, save it as DOCX, then pass its URL to the Editor above. This sample contains paragraph-style references and multilevel numbering definitions, rather than an HTML reconstruction.
- Style the surrounding application separately. Changing your site heading, list or table CSS is not a way to define Word paragraph styles or numbering; avoid broad rules that reset the Editor document descendants.
- Supply the document fonts when devices do not have them. Use fonts.families for the requested faces, then export DOCX through the included button to keep the edited file in the Word workflow.
Configure document fonts and substitutionsYour text edit is saved. Inspect the styles and references relevant to your files rather than treating one sample as a fidelity guarantee.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationEmbed a DOCX editor
Start with the public sample, then replace the document URL with a file your application is authorized to load. Uploaded files and shared room contents are never included in this project.
Open, edit and export the public sample. Your application owns access, storage and version history.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationInspect DOCX font resolution
Inspect requested and rendered families, then load an explicit Arial to Carlito substitution. The included Latin regular face is an evaluation input, not a complete font collection.
The report distinguishes logical and render families. A loaded explicit mapping is a rendering choice, not proof of a faithful font match. Export keeps the logical font name.
Open working example · View on GitHub · Download working project · Read complete source · Current documentationConfidence in the document. At every step.
DOCX Editors need perfect MS Word round-tripping, instant typing in long docs, and fast and reliable agent edits. Here is what we are measuring.
>9,300 rendering tests: We maintain and validate full MS Word compatibility. We never convert the DOCX.
How we measure: Every code change runs against a large corpus of real-world Word documents: we open each one in Chrome and check its rendering against the expected result. Each rendering feature, such as advanced lists, also gets its own dedicated fixtures. Before every release, we also compare rendering with the previous SuperDoc version and flag any regression automatically, so it is fixed before it ships.
Try the formatting sample
Try the latest stable release. The published figures above are not a measurement of your workload.
Under 100 ms per keystroke: Typical keystroke responsiveness: ~60 ms across browsers, even on long documents.
How we measure: We open a large corpus of real-world Word documents, such as supply agreements and stock purchase agreements, in Chrome and programmatically type into them at different speeds. Each keystroke is timed from the key press to the first frame that shows the character on screen. The figure is the median for each published release.
Try the long document on desktop
Try the latest stable release. The published figures above are not a measurement of your workload.
LLM tooling: Fast and effective agentic edits
16 s · $0.024 per task: Median model time and inference cost per DOCX editing task.
| Per task | SuperDoc | Claude Code |
|---|
| Median model time | 16 s | about 50 s |
| Median cost | $0.024 | $0.50 |
| Mean cost | $0.050 | about $0.46 |
How we measure: SuperDoc's AI tools and Claude Code got the same 40 everyday Word editing tasks on the same DOCX files. SuperDoc ran on OpenAI gpt-6-sol; Claude Code ran on Claude Fable 5.1 with Anthropic's docx skill. Time, cost and tool calls are measured per task from this month's runs, with cost taken from each run's actual token usage at API list prices.
Try an agent review
Try the latest stable release. The published figures above are not a measurement of your workload.
Pricing
Every plan includes: Unlimited documents, Unlimited users, Unlimited actions, All features included, All environments (QA, staging, prod), Self-hosted.
- Open Source (Free): SuperDoc is open source under AGPLv3 and all features remain free to use. Commercial licensing provides an alternative for covered proprietary use. Premium support and enterprise options are also available. License: AGPLv3 (open source). Scope: Use under AGPLv3. Support: Community.
- Business ($500/month or $6,000/year): Use all SuperDoc features anywhere in the product you’re building. Business covers unlimited documents, all your users and customer organizations, and a dedicated Slack channel with the SuperDoc team under standard terms. No hidden fees, usage reporting, or required telemetry. License: Commercial. Scope: Every use of SuperDoc within the licensed product, across all its users and customers. Support: Shared Slack channel with the SuperDoc team.
- Enterprise (Custom quote): Launch with a SuperDoc engineer who knows your product. We’ll review your integration, test with representative Word documents, and help your team plan the rollout. License: Commercial with custom terms available. Scope: Broader license rights available. Support: Launch engineering and SLA options.
Business billing choices
- Monthly $500/month. 7 days free. Add a card to start. Pay $500 after the trial unless you cancel. Renews monthly.
- Annual $6,000/year. 7 days free. Add a card to start. Pay $6,000 after the trial unless you cancel. Renews annually.
Prices are in USD. Applicable taxes are added at checkout or on your invoice.
Every way you use SuperDoc in the product you’re building. Generate a Word document on your server, let customers redline it in the browser, and let your agent propose changes. All of that is covered.
- All features and product updates
- Unlimited documents, users, and customers within your product
- A dedicated Slack channel for technical support from the SuperDoc team
- No hidden fees
- No usage reporting
- No telemetry required
Enterprise options
Get custom contract terms and the premium engineering support your rollout needs.
Scope your agreement to specific product areas or a defined platform and expand it as your rollout grows.
- Premium technical support. Work with a SuperDoc engineer to review your architecture, test your Word files, and get ready to launch.
- Production support SLA. Agree on initial response times, severity definitions, and support hours for covered production incidents.
- Custom contract terms. We can make material edits to our standard terms or work from your company’s or procurement partner’s agreement. We’ll confirm scope and price with you before contract review.
- Custom license scope. Define the products, product areas, platforms, legal entities, and distribution rights you need today. Add product areas, platforms, or affiliates by mutual agreement as adoption grows.
Request an invoice · Talk to an engineer · Send us a message
SuperDoc is self-hosted. It runs in your application, and you control where your documents are stored.
Read the standard commercial terms.
Buying with a coding agent? Read the signup guide.
FAQ
Getting Started
- Can I embed a DOCX editor in React or JavaScript?
- Yes. Use the superdoc package for JavaScript or @superdoc/react for React. Import the matching stylesheet, open a DOCX in the browser, and export an edited copy. The browser Editor needs no SuperDoc server of its own.
The quickstart includes a sample Word document and complete React and JavaScript projects. Make an edit, export the DOCX, and check the result in Word.
Open the React and JavaScript quickstart - How can a person review an agent's DOCX edits?
- Record the agent's edits as tracked changes, open the resulting DOCX in the browser Editor, and let a person accept or reject them before exporting a separate copy. Your application controls the agent's permissions and the review decision.
Build the tracked-change review workflow
Start with the synthetic document, then check that accepted text remains, rejected text is restored, and surrounding formatting is intact when you reopen the export in Word.
Run the accept and reject example - Can I fill repeated fields in a Word template?
- Yes. Use Word content controls to identify fields, find the occurrences sharing a tag, and update each matching value from your application. Validate the expected fields and save a separate DOCX so the source template stays available.
Try the repeated template fields guide and example
The guide includes a synthetic template and runnable code with its tested SDK version and limits. Check every expected occurrence in the exported file, then evaluate representative templates in Word.
Build a document field panel - Can I start with Business and upgrade later?
- Yes. Start with Business under standard terms. When your team needs hands-on launch engineering, a production support SLA, custom terms, or expanded license scope, we can add the services or coverage you need.
- Does SuperDoc work with documents opened in Microsoft Word?
- Yes. SuperDoc works directly with DOCX files and is built for interoperability with Microsoft Word and other DOCX-compatible workflows.
AI & Agents
- How can I use SuperDoc with AI and agents?
- SuperDoc provides the document infrastructure for AI-powered products. You choose the models, prompts, agent framework, and application logic.
Your AI or agents can use SuperDoc’s self-hosted Document API and developer tools to inspect, generate, edit, review, and transform DOCX files. Changes can be represented through native document features such as tracked changes and comments and shown to users in the browser editor.
SuperDoc handles the DOCX editing, formatting, rendering, and Word interoperability layers. Your application controls the model, orchestration, permissions, retrieval, and user experience.
SuperDoc is model- and provider-independent and can be used with hosted or local models. - Can agents edit documents using tracked changes and comments?
- Yes. Applications can use SuperDoc to let agents propose edits, create tracked changes, add comments, and participate in document-review workflows while preserving DOCX compatibility.
Your application determines which actions an agent may take and how users review or approve its work.
Deployment
- Where does SuperDoc run?
- SuperDoc is self-hosted and runs inside your application.
It can run:
• In the browser for interactive document experiences
• On your server for headless document generation, editing, and processing
• Across both for products that combine server-side automation with an interactive editor
• Directly within server-side or agent-driven workflows
• As tools, CLI, or MCP leveraged directly by your LLM or agent framework
You control the infrastructure and deployment. - Does SuperDoc host or store my documents?
- No. Documents remain within your infrastructure. SuperDoc does not require document content to be sent to or stored by us.
Your application controls storage, access, retention, and data residency. - Does SuperDoc require telemetry or usage reporting?
- No document-volume reporting is required.
Telemetry is configurable and can be disabled, including for deployments that cannot send data outside their environment. - Can I use SuperDoc in development and testing environments?
- Yes. Your licensed scope includes development, QA, staging, and disaster recovery environments that support your product.
Customization
- How much can I customize the user experience?
- SuperDoc is extensively customizable and designed to fit into your product’s UX.
You can control the surrounding interface, styling, workflows, actions, and which document capabilities are available in each part of your product. You can also apply your own permissions to determine who can view, comment, suggest changes, edit directly, or approve changes.
SuperDoc can be combined with your own panels, AI experiences, review flows, and application logic. It provides the document editing and rendering layer while your product defines the final user experience. - How does version history work?
- SuperDoc provides the document APIs and diff capabilities needed to build version-history workflows. Your application determines when to save and stores each version in your own infrastructure.
This lets you connect SuperDoc to your existing storage, permissions, retention, and audit model rather than adopting a separate SuperDoc-hosted document store.
Commercial
- Can I try SuperDoc before buying?
- Yes. Try the open-source editor without signing up. All features are available under AGPLv3. If you want to try the commercial license and support, the seven-day Business card trial starts online.
Try the DOCX editor - What does a Business license cover?
- Business covers all use of SuperDoc in one named product, including its browser editor, backend workflows and customer organizations.
Generate a Word document on your server, let customers redline it in the browser, and let your agent propose changes. All of that is covered.
• All features and product updates
• Unlimited documents, users, and customers within your product
• A dedicated Slack channel for technical support from the SuperDoc team
• No hidden fees
• No usage reporting
• No telemetry required - Can I buy Business without a sales call?
- Yes. Choose monthly or annual card billing and start a seven-day trial online. You can also request an annual Business invoice online and add a purchase order number.
Request an invoice
If you need a quote, a monthly invoice, or standard security and vendor documentation, use the Business request form.
Request a Business quote or vendor documents - What if one backend serves several products?
- Business covers the screens, workflows, backends, and customer organizations within your licensed product. Ask us about an agreement that covers additional products, platforms, affiliates, or distribution rights.
- How many people can edit at the same time?
- Business has no license caps on documents, users, or editing sessions. Document performance and concurrent editing capacity depend on your architecture, infrastructure, and document complexity.
For a production evaluation, test your representative DOCX files, editors per room, and simultaneous rooms against your collaboration backend.
Read the collaboration architecture guide - When should we talk about Enterprise?
- Choose Business if you need to license one product on standard terms. Enterprise can add the support, terms or coverage your rollout needs.
Premium technical support. Work with a SuperDoc engineer to review your architecture, test your Word files, and get ready to launch.
Production support SLA. Agree on initial response times, severity definitions, and support hours for covered production incidents.
Custom contract terms. We can make material edits to our standard terms or work from your company’s or procurement partner’s agreement. We’ll confirm scope and price with you before contract review.
Custom license scope. Define the products, product areas, platforms, legal entities, and distribution rights you need today. Add product areas, platforms, or affiliates by mutual agreement as adoption grows. - Can a coding agent help me choose a plan and start checkout?
- Yes. A coding agent can use our published pricing and license terms to help choose a plan, then open the same Business checkout you use yourself. There is no separate agent plan or additional agent fee.
You approve the subscription and acceptance of the Terms of Service and Privacy Policy. Completing checkout may need your input for authentication or payment approval. License-key details follow by email; you can install SuperDoc and start building before the key arrives. - Do commercial plans include product updates?
- Yes. Business and Enterprise include SuperDoc releases made available during the active subscription, including new features, improvements, and fixes.
- What support is included?
- Business includes a shared Slack channel for support and implementation questions, with a commercially reasonable effort to respond within one business day during normal support hours. A contractual SLA specifies initial response times, severity definitions, and support hours.
Security & Privacy
- Can SuperDoc access our documents?
- No. SuperDoc runs within your infrastructure and does not require document content to be sent to or stored by SuperDoc. Your team controls where documents are stored and processed.
- Can SuperDoc run in private or restricted environments?
- Yes. SuperDoc can run in your cloud, private network, or on-premises environment, including deployments without public internet access. Its collaboration infrastructure can also be self-hosted.
- What security materials are available?
- Ask us for standard security documentation, including the SOC 2 Type II report through our usual access process. Standard security review is available with Business.
Read Trust & Security