
DOCX JS Editor — Open Source DOCX Editor for React & JavaScript
Open-source WYSIWYG document editor for React. Edit .docx files directly in the browser — no server required.
DOCX Editor Features
Everything you need to edit .docx documents in the browser — no server, no plugins, just JavaScript.
Tables
Full table support with cell merging, borders, column resizing, and nested content. Render complex document layouts faithfully.
Images
Inline and floating images with positioning, wrapping modes, and resizing. Preserves image quality from the original .docx file.
Rich Formatting
Bold, italic, underline, strikethrough, font sizes, colors, highlights, and paragraph styles. Full OOXML formatting support.
Templates
Variable insertion system for document templates. Define placeholders and fill them programmatically or through a built-in panel.
Page Layout
Accurate page dimensions, margins, headers, footers, and page breaks. Multi-page document rendering with zoom control.
Plugin System
Extensible architecture with ProseMirror plugins. Add custom toolbar actions, keyboard shortcuts, and document transformations.
Get Started in Minutes
Add a full-featured DOCX editor to your React app with just a few lines of code.
import { useRef } from 'react';
import { DocxEditor, type DocxEditorRef } from '@eigenpal/docx-js-editor';
import '@eigenpal/docx-js-editor/styles.css';
function Editor({ file }: { file: ArrayBuffer }) {
const editorRef = useRef<DocxEditorRef>(null);
const handleSave = async () => {
const buffer = await editorRef.current?.save();
if (buffer) {
await fetch('/api/documents/1', { method: 'PUT', body: buffer });
}
};
return (
<>
<button onClick={handleSave}>Save</button>
<DocxEditor ref={editorRef} documentBuffer={file} />
</>
);
}Works with Your Stack
Framework examples with full source code to get you started.
Frequently Asked Questions
docx-js-editor is an open-source WYSIWYG document editor for React that lets you edit .docx files directly in the browser. It parses and renders OOXML documents with full fidelity, including tables, images, headers, footers, and rich formatting — no server-side processing required.
Yes. docx-js-editor is released under the MIT license. You can use it in personal and commercial projects, modify the source code, and distribute it freely. There are no usage limits, watermarks, or premium tiers.
docx-js-editor is a React component that works with any framework that supports React — Vite, Next.js, Remix, Astro, and more. Since it runs entirely in the browser as client-side JavaScript, it integrates into any web stack. The repository includes working examples for each framework.
No. Everything runs client-side — parsing, rendering, editing. Zero backend dependencies. Just install the package, pass a buffer, and you have a working editor. No infra to maintain.