toolmints
Tools
A CLEARER VIEW, RIGHT HERE

Your document.
A fresh perspective.

Open a Word document without opening Word. Read real pages, inspect the details,
and select text—all in your browser.

✓ No document upload✓ No sign-up✓ Free to use
FREE ONLINE DOCX VIEWER

Let’s open something.

Download sample ↓

A Word document, without the extra steps.

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.

FROM FILE TO FIRST PAGE

How to view a DOCX online

01

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.

02

Read and explore

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.

03

Finish with a clean slate

Open another document inside the viewer, or choose Close & clear document to unload the viewer and its worker. Your original file is not modified.

MORE THAN PLAIN TEXT

Formatting that tells the whole story

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 featureWhat the engine handlesWhat to keep in mind
Text and stylesParagraphs, headings, emphasis, alignment, numbering, and line wrapping.Missing fonts can change glyph shapes, line breaks, or pagination.
Pages and sectionsPage sizes, margins, breaks, columns, headers, footers, and notes.Word-specific layout behavior may differ. Check critical print layout in the authoring app.
TablesCell borders, merged cells, styled rows, and pagination logic.Highly complex tables may show differences or warnings.
Images and drawingsEmbedded raster images, DrawingML/VML shapes, and supported metafile content.Not every effect or drawing record is reproduced.
Charts and equationsRendering 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 linksA 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.

Where it is useful

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.

UNDER THE PAGE

How JavaScript turns DOCX into a document preview

DOCX fileZIP + XML + mediaParserContent + stylesLayout engineMeasured pagesBrowser viewerCanvas + text

1. Open the package

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.

2. Measure and paginate

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.

3. Send drawing instructions

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.

4. Add a text layer

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.

BUILT TO BE UNDERSTOOD

Embedding a DOCX renderer in a website

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>
JavaScript module
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);
  });

Asset paths and lifecycle

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.

How Toolmints integrates it with Astro

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.

Serving it with Nginx

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.

Performance and integration boundaries

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.

A FEW USEFUL ANSWERS

DOCX viewer questions

Does my document get uploaded?

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.

Do I need Microsoft Word or an account?

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.

Can I open .doc, PDF, or password-protected files?

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.

Why does the preview look different from Word?

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.

Can I search, copy, edit, or save as PDF?

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.

Why is a large document slow or rejected?

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.

Can I embed this on my own site?

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.

How do I clear a document?

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.

KEEP YOUR DAY MOVING

More small tools for real work.