Skip to content
pubscout

docx_to_text

1.0.1, released 3 years ago by an unverified publisher

A small Dart package for converting docx files (Microsoft Word) to string.

WASM-ready
$ flutter pub add docx_to_text
Source repository

What it does

Extracts text content from Microsoft Word .docx files. It processes the raw bytes of a document and returns the plain text string.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to extract plain text from .docx files in Dart or Flutter
  • You want a lightweight solution with minimal dependencies for reading Word documents

Skip it when

  • You need to preserve complex document formatting, styles, images, or tables
  • You need to create, edit, or save .docx files rather than just reading them

Strengths

  • Simple and straightforward API
  • Works across multiple platforms including Android, iOS, web, Windows, macOS, and Linux

Weaknesses

  • Only extracts text (text only), dropping all layout and styling
  • Limited feature set for advanced document manipulation

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:docx_to_text/docx_to_text.dart';

final file = File('path/to/file.docx');
final bytes = await file.readAsBytes();
final text = docxToText(bytes);

Alternatives

Packages that do the same job and could replace docx_to_text.

Works with

Packages commonly used together with docx_to_text: ones it builds on, ones built on it, and its own family.