Choose your document
Select Open viewer, then use its file chooser or drag a .docx into the viewer. The page reads the selected file locally. There is no document-upload endpoint.
Open a Word document without opening Word. Read real pages, inspect the details,
and select text—all in your browser.
Start the viewer to choose or drop a .docx file.
Just looking around? Our sample is ready to explore.
DOCX only · Up to 20 MB · Documents stay on your device
The document engine loads only when you open the viewer.
Select Open viewer, then use its file chooser or drag a .docx into the viewer. The page reads the selected file locally. There is no document-upload endpoint.
Scroll through the pages. Use + and − to zoom, or Fit to fit the page width. Drag over text to select and copy it. The status bar tracks your position.
Open another document inside the viewer, or choose Close & clear document to unload the viewer and its worker. Your original file is not modified.
This viewer uses a document layout engine rather than extracting only the words. It interprets document structure and positions content on pages. Support varies with the document’s features, fonts, and complexity.
| Document feature | What the engine handles | What to keep in mind |
|---|---|---|
| Text and styles | Paragraphs, headings, emphasis, alignment, numbering, and line wrapping. | Missing fonts can change glyph shapes, line breaks, or pagination. |
| Pages and sections | Page sizes, margins, breaks, columns, headers, footers, and notes. | Word-specific layout behavior may differ. Check critical print layout in the authoring app. |
| Tables | Cell borders, merged cells, styled rows, and pagination logic. | Highly complex tables may show differences or warnings. |
| Images and drawings | Embedded raster images, DrawingML/VML shapes, and supported metafile content. | Not every effect or drawing record is reproduced. |
| Charts and equations | Rendering code for common and extended chart types, plus Office math. | Preview support is not a guarantee of identical results for every chart or equation. |
| Selection and links | A selectable text overlay, external hyperlinks, and internal bookmark navigation. | Text selection may be approximate for rotated elements. Only rendered pages participate in native browser find. |
Preview a report before downloading it elsewhere, read a document on a device without Word, inspect a supplier’s table, or evaluate an embedded document preview for a portal or knowledge base. It is a reader, not an editor: it does not save changes, execute macros, or provide a DOCX-to-PDF export.
A DOCX file is a ZIP package containing XML parts, relationships, and media. The parser reads the main document and the parts it references, including styles and numbering. Validation distinguishes supported DOCX packages from legacy Word files and encrypted documents.
The layout engine interprets paragraphs, runs, tables, sections, and drawing objects. It reads font metrics from TrueType binaries to measure text, decide line breaks, and place content on pages. This work runs in a Web Worker, keeping document layout off the main UI thread.
The worker produces display lists: positioned instructions for text, images, shapes, and links. The main page receives those lists, installs the referenced font faces, and draws the visible pages onto high-resolution canvases.
Canvas pixels alone cannot be selected as text. The viewer adds transparent text spans aligned with the drawn words, plus link overlays. Pages outside the viewing area release their canvas and text elements to reduce rendering memory; their layout data remains available for scrolling back.
The integration has three pieces: a JavaScript viewer module, a worker bundle, and font files. Toolmints serves them from the same origin. The following example shows the API used by this renderer; adapt asset paths to your own authorized deployment. Publication here does not grant a software redistribution license.
<input id="document-file" type="file" accept=".docx" />
<div id="document-preview" style="height: 720px"></div>import { DocxViewer } from './docxview/viewer.js';
const viewer = DocxViewer.mount(
document.getElementById('document-preview'),
{
workerUrl: '/docxview/worker.js',
fontBaseUrl: '/docxview/fonts/',
}
);
document.querySelector('#document-file')
.addEventListener('change', async (event) => {
const file = event.target.files?.[0];
if (file) await viewer.open(file);
});workerUrl points to the module worker; fontBaseUrl points to the font directory and must end in a slash. DocxViewer.mount() attaches the interface to a container with a defined height. viewer.open() accepts a File, ArrayBuffer, or Uint8Array. Its returned promise starts the worker request; final rendering completion arrives through worker messages rather than that promise.
Astro builds the guide, headings, links, and metadata as static HTML. A small client script creates a same-origin iframe only after you open the viewer or sample. The iframe loads the renderer and its worker; the bundled fonts are fetched when a document is opened. Closing the iframe unloads the document environment. Other calculators and converters do not load these assets.
No document-conversion server or Office installation is required. Serve the built files over HTTPS with correct JavaScript MIME types. Keep worker and font URLs on the same origin, permit same-origin scripts and workers in your Content Security Policy, and allow the viewer’s generated styles. Toolmints uses default-src 'self' and style-src 'self' 'unsafe-inline'. A cross-origin iframe is not necessary.
The worker moves parsing and layout off the interface thread, while viewport-based rendering reduces canvas allocation. This does not make unlimited documents cheap: decompression, page layout, images, fonts, and display lists still consume memory. Toolmints limits input to 20 MB, rejects packages exceeding its expanded-content limits, and stops rendering jobs that exceed one minute. There is no full-document search UI, editing API, or PDF export in this integration.
No. Selected document bytes are read in your browser and passed to a local Web Worker. The page downloads its code, fonts, and the optional sample from Toolmints. Toolmints records fixed usage labels such as viewer opened, layout completed, or rendering failed, distinguishing the sample from local documents. These events do not include document contents, filenames, file sizes, page counts, links, or error text. Google Analytics also collects standard website usage metadata. Normal website requests may be logged by the host. Clicking an external link in a document opens that destination.
No. Use a current browser with JavaScript, Web Workers, canvas, and DecompressionStream support. There is no account requirement. Rendering and font behavior can differ between browsers and devices.
This tool is for unencrypted .docx files. Legacy .doc and password-protected documents are rejected. PDF is a different format. If you have access to the original document, save an unencrypted DOCX copy in its authoring application first.
Font substitution, unsupported effects, complex drawings, and application-specific layout rules can affect the result. Read any warnings shown by the viewer. Supplying a matching TTF font may help; exact compatibility is not guaranteed. Review final printing and sensitive formatting in the original authoring application.
You can select and copy rendered text. Browser find only sees text currently materialized in the viewer, so it is not a reliable search across all pages. This release has no document editing or PDF export. Use your document application for those tasks.
Images, complex tables, drawings, and decompressed XML can be much larger than the file on disk. The public viewer accepts files up to 20 MB and applies rendering limits. Try a smaller document, close other memory-heavy tabs, or use a desktop application for unusually large files.
The API example explains the integration pattern. You need appropriate permission to use the renderer and its dependencies. This page does not publish an open-source SDK license. The bundled fonts retain their respective license notices.
Choose Close & clear document to remove the iframe and unload its worker, or close the tab. Toolmints does not deliberately persist the selected document in browser storage. Your original file remains on your device.