# BetterOffice

The open-source office suite. High-fidelity editing and real-time collaboration for people and agents, on Rust engines that run anywhere.

- [Demos](https://demo.betteroffice.dev)
- [Documentation](https://docs.betteroffice.dev)
- [GitHub](https://github.com/openooxml/betteroffice)
- [Blog](https://betteroffice.dev/blog.md)
- [Full index for agents](https://betteroffice.dev/llms.txt)

Used by: [OpenCode](https://opencode.ai), [T3 Code](https://t3.codes), [atira](https://atira.ai), [Ketryx](https://www.ketryx.com) and others.

## One suite, four editors

Every editor edits the file itself, with no conversion on open or save.

- **Documents** (`.docx`, available) — Redline a contract with your team while an agent proposes the next clause. [Demo](https://demo.betteroffice.dev/docx)
- **Spreadsheets** (`.xlsx`, available) — Build a quarterly budget and watch every dependent formula update as you edit. [Demo](https://demo.betteroffice.dev/xlsx)
- **Slides** (`.pptx`, available) — Rework a pitch deck in the browser and hand it back as a real .pptx. [Demo](https://demo.betteroffice.dev/pptx)
- **Diagrams** (`.vsdx`, from source) — Update a process map's shape data and drop it into a Word or PowerPoint report.

## Features

Every BetterOffice editor runs on Rust engines, from opening and editing files to layout and rendering. The same engines run in your browser, on your servers and inside agent workflows.

- **Documents, spreadsheets, and slides.** Open, edit, render, and save DOCX, XLSX and PPTX files with high fidelity. Native OOXML editing preserves untouched file parts losslessly when round-tripping.
- **Agent editing with human review.** Review attributed agent edits through tracked changes, inline diffs, and before-and-after previews. Accept or reject changes directly in the editor.
- **Real-time collaboration.** People and agents edit the same file together, with live cursors and selections. Concurrent changes merge automatically, and offline edits sync when peers reconnect.
- **Undo and redo.** Navigate editing history and undo accepted agent proposals as a single step.
- **Embed or automate.** Drop React editors into your app, build on the framework-free JavaScript cores, or use Rust and Python APIs for headless processing and agent workflows.
- **Open source and self-hostable.** Apache-2.0 licensed, with control over your document storage, deployment, and collaboration infrastructure.

[All features](https://docs.betteroffice.dev/docs)

## Benchmarks

Generated by the [Benchmarks action](https://github.com/openooxml/betteroffice/actions/workflows/visual-fidelity.yml); per-document results are on the [benchmarks site](https://benchmarks.betteroffice.dev). For how scores, timings and coverage are measured, see the [benchmark methodology](https://github.com/openooxml/betteroffice/blob/main/scripts/office-quality/README.md).

### Documents (.docx)

- **Visual similarity**, SSIM against Word, 0 to 1 (higher is better): BetterOffice 0.8519, LibreOffice 0.7694
- **Exact page counts**, documents with Word's page count (higher is better): BetterOffice 63/63, LibreOffice 44/63

- **Render time**, average per document (lower is better): BetterOffice 430 ms, LibreOffice 773 ms

All results:

| | BetterOffice ([3a49caad](https://github.com/openooxml/betteroffice/commit/3a49caad7db3114258669913e6eda9a066c50dd8)) | LibreOffice (26.2.3.2) |
| --- | ---: | ---: |
| Exact page counts | 63/63 | 44/63 |
| Absolute page error | 0 | 57 |
| SSIM | 0.8519 | 0.7694 |
| Scored/total | 63/63 | 63/63 |
| Render time (avg) | 430 ms | 773 ms |
| Parse success | 100.00% | 100.00% |

### Spreadsheets (.xlsx)

- **Visual similarity**, SSIM against Excel, 0 to 1 (higher is better): BetterOffice 0.7661, LibreOffice 0.6892
- **Formula accuracy**, results matching Excel after recalculation (higher is better): BetterOffice 99.60%, LibreOffice 85.87%

- **Recalculation time**, average per workbook (lower is better): BetterOffice 64 ms, LibreOffice 405 ms

All results:

| | BetterOffice ([3a49caad](https://github.com/openooxml/betteroffice/commit/3a49caad7db3114258669913e6eda9a066c50dd8)) | LibreOffice (26.2.3.2) |
| --- | ---: | ---: |
| SSIM | 0.7661 | 0.6892 |
| Scored/total | 207/208 | 195/208 |
| Recalc accuracy | 99.60% | 85.87% |
| Recalc time (avg) | 64 ms | 405 ms |
| Parse success | 100.00% | 100.00% |

### Slides (.pptx)

- **Visual similarity**, SSIM against PowerPoint, 0 to 1 (higher is better): BetterOffice 0.9170, LibreOffice 0.9030

- **Render time**, average per presentation (lower is better): BetterOffice 159 ms, LibreOffice 1351 ms

All results:

| | BetterOffice ([3a49caad](https://github.com/openooxml/betteroffice/commit/3a49caad7db3114258669913e6eda9a066c50dd8)) | LibreOffice (26.2.3.2) |
| --- | ---: | ---: |
| SSIM | 0.9170 | 0.9030 |
| Scored/total | 103/103 | 103/103 |
| Render time (avg) | 159 ms | 1351 ms |
| Parse success | 100.00% | 100.00% |

BetterOffice [3a49caad](https://github.com/openooxml/betteroffice/commit/3a49caad7db3114258669913e6eda9a066c50dd8), LibreOffice 26.2.3.2

[Per-document results](https://benchmarks.betteroffice.dev)

### Agent edits

Same model, 288 graded runs, two toolsets. An edit counts only if the requested change is there and nothing else in the file moved.

- **Documents** (.docx): BetterOffice MCP 76/96, Generic file tools 43/96
- **Spreadsheets** (.xlsx): BetterOffice MCP 94/96, Generic file tools 49/96
- **Slides** (.pptx): BetterOffice MCP 92/96, Generic file tools 84/96

[Method, tasks and fixtures](https://github.com/openooxml/betteroffice#evals)

## People and agents, one document

The document itself is a CRDT: every editor — every person, every AI agent — is a peer on the same data structure, and concurrent edits merge in the engine. Agents don't get a sidebar; they get a cursor, with the same undo and the same tracked-changes attribution as any co-author.

[Collaboration guide](https://docs.betteroffice.dev/docs/collaboration)

- **People.** Live co-editing over any WebSocket relay. Offline edits converge on reconnect.
- **Agents.** An agent edits through the same operations as a person, and human review is suggesting mode — accept or reject tracked changes, not a diff dialog.

## Ships as components, not iframes

The DOCX, XLSX and PPTX editors install from npm and render inside your app — no embeds, no external services, documents never leave the page.

See the [package guide](https://docs.betteroffice.dev/docs/packages) for supported runtimes and fonts, and [release notes](https://github.com/openooxml/betteroffice/releases) for version-specific changes.

One install line per ecosystem:

- **JavaScript** (`npm install @betteroffice/docx-react`) — Published React editors and framework-free cores for DOCX, XLSX and PPTX. [npm](https://www.npmjs.com/org/betteroffice), [guide](https://docs.betteroffice.dev/docs/javascript)
- **Rust** (`cargo add betteroffice-docx`) — The same engines natively, for servers, CLIs and agent pipelines. [crates.io](https://crates.io/search?q=betteroffice), [guide](https://docs.betteroffice.dev/docs/rust)
- **Python** (`pip install betteroffice-xlsx`) — Published DOCX, XLSX and PPTX packages, with installation and examples in the Python guide. [PyPI](https://pypi.org/project/betteroffice-xlsx), [guide](https://docs.betteroffice.dev/docs/python)

- [`@betteroffice/agents`](https://www.npmjs.com/package/@betteroffice/agents) — Tools for agents to search, read, edit and preview DOCX, XLSX and PPTX files, through a TypeScript SDK or a local MCP server.
- [`@betteroffice/docx`](https://www.npmjs.com/package/@betteroffice/docx) — Framework-free DOCX core: parsing, CRDT editing, page layout and rendering on the Rust engine.
- [`@betteroffice/docx-react`](https://www.npmjs.com/package/@betteroffice/docx-react) — The DOCX editor and viewer as a drop-in React component.
- [`@betteroffice/xlsx`](https://www.npmjs.com/package/@betteroffice/xlsx) — Framework-free spreadsheet core: parsing, formula calculation and rendering on the Rust engine.
- [`@betteroffice/xlsx-react`](https://www.npmjs.com/package/@betteroffice/xlsx-react) — The spreadsheet editor and viewer as a drop-in React component.
- [`@betteroffice/pptx`](https://www.npmjs.com/package/@betteroffice/pptx) — Framework-free slides core: parsing, editing and rendering on the Rust engine.
- [`@betteroffice/pptx-react`](https://www.npmjs.com/package/@betteroffice/pptx-react) — The slides editor and viewer as a drop-in React component.

## From the blog

- [BetterOffice vs docx-editor.dev](https://betteroffice.dev/blog/betteroffice-vs-docx-editor.md), October 24, 2026: Milliseconds vs seconds. About 40 ms a page vs about half a second a page. Put the kettle on.
- [BetterOffice vs Univer](https://betteroffice.dev/blog/betteroffice-vs-univer.md), October 24, 2026: Week 54 in January, the number 1 in fourth place, 9:00 AM at #VALUE!. Welcome to Univer Standard Time.

[All posts](https://betteroffice.dev/blog.md) · [Atom feed](https://betteroffice.dev/blog/feed.xml)

## The future is yours to edit.

[Try it out](https://demo.betteroffice.dev), or [explore the docs](https://docs.betteroffice.dev) for setup, APIs, and format support.

---

# BetterOffice vs docx-editor.dev

> Milliseconds vs seconds. About 40 ms a page vs about half a second a page. Put the kettle on.

- Published: 2026-10-24
- Authors: BetterOffice maintainers
- Tags: BetterOffice, docx-editor.dev
- URL: https://betteroffice.dev/blog/betteroffice-vs-docx-editor
- Markdown: https://betteroffice.dev/blog/betteroffice-vs-docx-editor.md

**577.5 ms vs 55.8 seconds.**

That is the median longest main-thread freeze while each editor opens the same public document. BetterOffice 0.5.0 measures it in milliseconds. docx-editor.dev needs a different unit.

And that is the short part. Five minutes in, docx-editor.dev still had not finished laying the document out. BetterOffice was done in under a minute.

Put the kettle on. This one takes a while.

Versions throughout: BetterOffice 0.5.0, docx-editor.dev 2.32.0, Chromium 149.

## One freeze. 55.8 seconds. And that is just the trailer.

The [public composite document](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/build-public-composite.py) is 15 public documents in one 44.3 MB file. BetterOffice lays it out on 1,263 pages.

Longest single main-thread task, min / median / max, n=6 opens per editor:

- BetterOffice: **483 / 577.5 / 753 ms**
- docx-editor.dev: **47.6 / 55.8 / 63.0 seconds**

Check the units. BetterOffice's worst run: 753 ms. docx-editor.dev's best run: 47.6 seconds.

docx-editor.dev shows the document early. Then, after its open has completed, one task moves in and holds the main thread for 47.6 to 63.0 seconds. Not the whole open. One task. The layout behind it keeps going for minutes.

We gave it more fonts: its fuller documented setup, every default face plus its prefetched pinned font catalog. It gave us **42.0 / 54.3 / 60.1 seconds**. BetterOffice: **453 / 709.5 / 784 ms**. Generous.

## Five minutes in. Still laying out.

We gave both of them five minutes to finish.

BetterOffice laid out all 1,263 pages in 41 to 59 seconds, every run, and never froze the page for longer than 784 ms while doing it. That is about 40 ms a page (32 to 47 ms, derived).

docx-editor.dev, 300 seconds in: page 530 to 597. All six runs. Still laying out. Not finished, not close. That is about half a second a page (0.50 to 0.57 s, derived), and the minute-long freeze is inside those five minutes.

You could make tea while page 600 renders. In 300 seconds, in six runs, page 600 never showed up. BetterOffice was done with page 1,263 by second 59.

Check the units again.

## Review tools: ours ship. Theirs come with section 3.

BetterOffice includes tracked changes, comments and real-time collaboration in its Apache-2.0 packages. Put them in production. No commercial agreement for those features.

docx-editor.dev has the same features in [@docx-editor.dev/pro](https://www.npmjs.com/package/@docx-editor.dev/pro) 2.32.0, under the [EigenPal Pro Evaluation License 1.0](https://unpkg.com/@docx-editor.dev/pro@2.32.0/LICENSE.md). Section 3 is titled **"No Production Use"**. It permits internal, non-production evaluation.

No stopwatch required for this one. Just section 3.

## Word says 23 pages. docx-editor.dev says 20.

The public MIT-licensed [Smart Mailbox final report](https://corpus.betteroffice.dev/smart-mailbox-final-report/source.docx): Word, 23 pages. BetterOffice, 23 pages. docx-editor.dev, 20.

Word puts the four-image panel on page 20. So does BetterOffice. Compared with Word's page, BetterOffice scores **0.984 SSIM**. docx-editor.dev scores **0.697**. (1.0 means identical.)

![Final report page 20 in Word, BetterOffice and docx-editor.dev.](/blog/betteroffice-vs-docx-editor/fid-smart-mailbox-final-report-p20-v232.png)

The [lab notebook](https://corpus.betteroffice.dev/smart-mailbox-lab-notebook/source.docx) from the same project: Word, 37 pages. BetterOffice, 37. docx-editor.dev, 33.

Page 3 holds a meeting record with nested lists. Word draws round bullets. BetterOffice draws round bullets. docx-editor.dev draws hollow squares. Page score: **0.914** for BetterOffice, **0.745** for docx-editor.dev.

![Lab notebook page 3 list in Word, BetterOffice and docx-editor.dev.](/blog/betteroffice-vs-docx-editor/fid-smart-mailbox-lab-notebook-p3-v232-zoom.png)

Milliseconds against seconds. Production against section 3. 23 pages against 20. Round against square.

Check the units. Then count the pages.

## How we measured

Harness and commands: [scripts/compare](https://github.com/openooxml/betteroffice/tree/main/scripts/compare). BetterOffice 0.5.0, docx-editor.dev 2.32.0, Chromium 149, same 6 vCPU VM.

- **Main thread:** the [public composite](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/build-public-composite.py) and its [attribution list](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/public-composite.json) (sources CC-BY-4.0, OGL-UK-3.0, OGL-Canada-2.0, CC0-1.0 and US public domain). Longest main-thread task from the start of open, n=6 opens per editor after one warm-up, alternating order. BetterOffice's window runs until all 1,263 pages are laid out; docx-editor.dev's covers the first 300 s, and in all six runs it was still laying out at 300 s (530 to 597 pages). Its longest task came after its open had completed (38 to 44 s after open began). The font control run used the same windows and n. This measures main-thread responsiveness during open, not total open time.
- **Per-page rates (derived, not separately measured):** docx-editor.dev 300/597 = 0.50 s and 300/530 = 0.57 s per page, averaged over the first 300 s while still laying out. BetterOffice 41/1263 = 32 ms and 59/1263 = 47 ms per page, averaged from the start of open to complete layout.
- **Licences:** [@docx-editor.dev/pro](https://www.npmjs.com/package/@docx-editor.dev/pro) 2.32.0 and the BetterOffice packages. The docx-editor.dev core and React packages are Apache-2.0.
- **Layout:** the [final report](https://corpus.betteroffice.dev/smart-mailbox-final-report/source.docx) and [lab notebook](https://corpus.betteroffice.dev/smart-mailbox-lab-notebook/source.docx) (MIT, [upstream repository](https://github.com/jeongwhanchoi/Smart-Mailbox/tree/e4bf604b55a2f7c465802286f5f289d8364bbeda)). One deterministic capture per editor (n=1), compared with Word 16 page renders by structural similarity (SSIM, 1.0 means identical), scored with the repository's [office-quality compare.py](https://github.com/openooxml/betteroffice/blob/main/scripts/office-quality/compare.py). Each result is one document, not a fidelity average.


---

# BetterOffice vs Univer

> Week 54 in January, the number 1 in fourth place, 9:00 AM at #VALUE!. Welcome to Univer Standard Time.

- Published: 2026-10-24
- Authors: BetterOffice maintainers
- Tags: BetterOffice, Univer
- URL: https://betteroffice.dev/blog/betteroffice-vs-univer
- Markdown: https://betteroffice.dev/blog/betteroffice-vs-univer.md

**Monday, January 4, 2021. Week 1 in BetterOffice. Week 54 in Univer.**

It had a big weekend.

Welcome to Univer Standard Time, where the number 1 finishes fourth, 9:00 AM is #VALUE! and BetterOffice's slowest cell edit beats Univer's fastest. No adjectives survived contact with these cells.

Versions throughout: BetterOffice 0.5.0, Univer presets 1.2.0, Chromium 149.

## Bring the .xlsx. BetterOffice opens it.

BetterOffice opens .xlsx bytes directly in the browser. That is the whole workflow.

Univer's open-source packages load IWorkbookData snapshots, not .xlsx bytes. An application supplies its own converter or uses Univer's [documented import](https://docs.univer.ai/guides/sheets/features/import-export), which runs through its Pro exchange packages and a conversion backend. For these tests we handed Univer pre-converted snapshots from our own adapter. BetterOffice got the file.

## Week 54, four days into January

January 4, 2021 is a Monday. ISO 8601 and Microsoft's ISOWEEKNUM documentation both put it in week 1.

`=ISOWEEKNUM(DATE(2021,1,4))`

- BetterOffice: **1**
- Univer: **54**

That was not a one-off. Across n=10 dates in the [ISO week workbook](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/edge/formula_probe.py), checked against Microsoft's definition and an independent ISO calendar, BetterOffice matches **all 10**. Univer differs on **8**.

![=ISOWEEKNUM(DATE(2021,1,4)) returns 1 in BetterOffice and 54 in Univer.](/blog/betteroffice-vs-univer/sheets-formula-isoweeknum-v120.png)

## The number 1 finishes fourth

Microsoft's documentation says RANK.EQ ignores non-numeric values in the reference. In the [ranking workbook](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/edge/formula_probe.py), E1:E3 hold 1, 2, 3. E4:E6 hold formulas returning `""`. Nothing.

`=RANK.EQ(1,E1:E6,1)` returns **1** in BetterOffice and **4** in Univer. RANK does the same.

Three empty results entered the race. The smallest number in the range came fourth.

![=RANK.EQ(1,E1:E6,1) returns 1 in BetterOffice and 4 in Univer.](/blog/betteroffice-vs-univer/sheets-formula-rankref-eq-v120.png)

## Your quarter hour has been declined

`=MROUND(0.378,"0:15")` rounds a time to the nearest quarter hour.

BetterOffice returns **0.375 (9:00 AM)**. Univer returns **#VALUE!**.

Nothing says 9:00 AM like #VALUE!. Five of five such expressions in the [time-rounding workbook](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/edge/formula_probe.py): same result.

![=MROUND(0.378,"0:15") returns 0.375 in BetterOffice and #VALUE! in Univer.](/blog/betteroffice-vs-univer/sheets-formula-mround-time-v120.png)

## Awkward podium

Scroll a synthetic 30,000-row workbook on a 6 vCPU [Kyora](https://kyora.sh) VM. Frames per second, min / median / max:

- BetterOffice: **29.6 / 37.7 / 41.4**
- Univer: **17.0 / 19.0 / 19.8**

BetterOffice's worst session: 29.6. Univer's best: 19.8.

Now edit some cells in those same sessions. From pressing Enter to the first frame showing the value, 24 edits per editor, min / median / max:

- BetterOffice: **33 / 54 / 93 ms**
- Univer: **149 / 236.5 / 3,539 ms**

BetterOffice's slowest edit: 93 ms. Univer's fastest: 149 ms. Univer's slowest: 3.539 seconds.

Read it again. We did.

Week 54. Fourth place for the number 1. A quarter hour at #VALUE!. Up to 3,539 ms to show an edited cell. Welcome to Univer Standard Time.

## How we measured

Harness and commands: [scripts/compare](https://github.com/openooxml/betteroffice/tree/main/scripts/compare). BetterOffice 0.5.0, Univer presets 1.2.0, Chromium 149.

- **Import:** BetterOffice opens .xlsx bytes. Univer opened IWorkbookData snapshots pre-converted by our ExcelJS-based adapter, so open time is not compared.
- **Formulas:** the [ISO week](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/edge/formula_probe.py) (n=10 dates), [ranking](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/edge/formula_probe.py) (n=2 failing fixtures, one per function, plus one passing control holding only the numbers, which returns 1 in both; cell references, not array constants) and [time-rounding](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/edge/formula_probe.py) (five of five expressions) workbooks. Typed inputs and no cached values, so the conversion cannot change the results. Each expected value checked against Microsoft's documentation and an independent calculation; each Univer value traced to the function's implementation in @univerjs/engine-formula 1.2.0.
- **Scrolling and edits:** a 30,000-row workbook from the [scale generator](https://github.com/openooxml/betteroffice/blob/main/scripts/compare/sheets/gen.mjs), same 6 vCPU [Kyora](https://kyora.sh) VM, n=6 interleaved measured sessions per editor after one warm-up. 5 s of mouse-wheel input from the middle row (one 100 px wheel event every 50 ms); frames are the ones Chromium's DevTools screencast (`Page.screencastFrame`) delivered during those 5 s. 4 cell edits per session (24 per editor), timed from Enter to the first frame showing the value.
