A modern, user-friendly browser-based graphical interface for Docling - the powerful document conversion library by IBM.
- Drag-and-Drop Upload: Simply drag your documents onto the interface
- URL-Based Conversion: Convert documents directly from URLs with automatic image extraction for HTML pages
- Multi-file and folder upload: Convert multiple files or URLs at once from one drop zone—choose a folder, use Choose files…, or drag and drop; unsupported extensions are skipped client-side, and the API rejects a batch if nothing can be converted
- Multi-Format Support: Convert PDFs, Word docs, PowerPoints, Excel files, HTML, Markdown, images, and more
- Multiple Export Formats: Export to Markdown, HTML, JSON, DocTags, Document Tokens, RAG Chunks, or plain text
- Image & Table Extraction: Extract embedded images and tables with CSV export
- Image Preview Gallery: View extracted images as thumbnails with full-size lightbox viewer
- RAG-Ready Chunking: Generate document chunks optimized for RAG applications
- Advanced OCR: Multiple OCR backends with GPU acceleration support
- Real-Time Progress: Watch your document conversion progress in real-time
- Conversion History: Access previously converted documents and reload them without re-conversion
- Document Persistence: Processed documents are stored on disk and can be reloaded from history
- Content Deduplication: Same file with identical settings reuses stored output (instant cache hits)
- Highly Configurable: Customize OCR, tables, images, performance, and chunking settings
- Beautiful Dark Theme: Easy on the eyes with a modern, professional design
- Accessibility: Keyboard-friendly slide-overs named with
aria-label, focus trap and restore, labeled controls and progress, focusable scroll regions for long content, link underlines (not color alone), and docs styling/scripts described in Accessibility
| Format | Extensions | Description |
|---|---|---|
.pdf |
Portable Document Format | |
| Word | .docx |
Microsoft Word documents |
| PowerPoint | .pptx |
Microsoft PowerPoint presentations |
| Excel | .xlsx |
Microsoft Excel spreadsheets |
| HTML | .html, .htm |
Web pages |
| Markdown | .md, .markdown |
Markdown files |
| Images | .png, .jpg, .jpeg, .tiff, .gif, .webp, .bmp |
Direct image OCR |
| AsciiDoc | .asciidoc, .adoc |
Technical documentation |
| PubMed XML | .xml |
Scientific articles |
| USPTO XML | .xml |
Patent documents |
| Format | Extension | Description |
|---|---|---|
| Markdown | .md |
Formatted text with headers, lists, links |
| HTML | .html |
Web-ready format with styling |
| JSON | .json |
Full document structure |
| Plain Text | .txt |
Simple text without formatting |
| DocTags | .doctags |
Tagged document format |
| Document Tokens | .tokens.json |
Token-level representation |
| RAG Chunks | .chunks.json |
Chunks for RAG applications |
- Python 3.10+ (3.13 recommended)
- Node.js 20.19+ or 22+ (22 recommended for Vite 7)
- npm or yarn
-
Clone the repository:
git clone https://github.com/duckling-ui/duckling.git cd duckling -
Set up the backend:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Set up the frontend:
cd ../frontend npm install
-
Start the backend (in one terminal):
cd backend source venv/bin/activate python duckling.py
The API will be available at
http://localhost:5001 -
Start the frontend (in another terminal):
cd frontend npm run devThe UI will be available at
http://localhost:3000 -
Batch and folder uploads: Drag a folder or multiple files onto the drop zone, click the zone to pick a folder, or use Choose files… for loose files—see the Quick Start guide.
Duckling uses MkDocs + mkdocs-static-i18n for multilingual docs. Production docs at duckling-ui.org are built with mike for multi-version support. With Material’s integrated TOC (toc.integrate), translate section headings in localized Markdown (for example docs/fr/user-guide/features.md) so the sidebar matches each locale. Supported formats and Screenshots are mirrored under docs/{de,fr,es}/user-guide/formats.md and screenshots.md (UI strings, captions, tab titles; image paths ../../assets/...). Homepage feature tiles in docs/{de,fr,es}/index.md should link to those locale-specific heading anchors (for example #glisser-deposer on the French Features page), not English slugs. The de, fr, and es trees mirror the English layout (getting started, user guide, API, architecture, deployment, contributing, changelog): keep them in sync when you add or change docs.
- Build (strict):
./scripts/docs-build.sh- Serve locally:
./scripts/docs-serve.shQuick Start (Build Locally):
docker-compose up --buildUsing Pre-built Images:
# Download and run pre-built images
curl -O https://raw.githubusercontent.com/duckling-ui/duckling/main/docker-compose.prebuilt.yml
docker-compose -f docker-compose.prebuilt.yml up -dProduction Deployment:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -dAccess the application at http://localhost:3000
Build Docker Images:
# Build images locally
./scripts/docker-build.sh
# Build and push to registry
./scripts/docker-build.sh --push --registry yourusernameWhen PRs are merged to main, images are automatically published to Docker Hub and GitHub Container Registry. See Docker Deployment Guide for details and required secrets.
Create a .env file in the backend directory:
FLASK_ENV=development
SECRET_KEY=your-secret-key
DEBUG=True
MAX_CONTENT_LENGTH=104857600 # 100MBSettings can be configured through the UI or via the API. All settings are organized into categories:
| Setting | Description | Default |
|---|---|---|
enabled |
Enable/disable OCR | true |
backend |
OCR engine (easyocr, tesseract, ocrmac, rapidocr) | easyocr |
language |
Primary language for recognition | en |
force_full_page_ocr |
OCR entire page vs detected regions | false |
use_gpu |
Enable GPU acceleration (EasyOCR) | false |
confidence_threshold |
Minimum confidence for results | 0.5 |
Supported Languages: English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Russian, Japanese, Chinese (Simplified/Traditional), Korean, Arabic, Hindi, Thai, Vietnamese, Turkish, Ukrainian, Czech, Greek, Hebrew, Indonesian, Malay, Swedish, Danish, Finnish, Norwegian
| Setting | Description | Default |
|---|---|---|
enabled |
Enable table detection | true |
mode |
Detection mode (fast/accurate) | accurate |
do_cell_matching |
Match cell content to structure | true |
structure_extraction |
Preserve table structure | true |
| Setting | Description | Default |
|---|---|---|
extract |
Extract embedded images | true |
classify |
Classify and tag images | true |
generate_page_images |
Create page images | false |
generate_picture_images |
Extract pictures as files | true |
generate_table_images |
Extract tables as images | true |
images_scale |
Scale factor (0.1-4.0) | 1.0 |
| Setting | Description | Default |
|---|---|---|
device |
Processing device (auto/cpu/cuda/mps) | auto |
num_threads |
CPU threads (1-32) | 4 |
document_timeout |
Max processing time (seconds) | null |
| Setting | Description | Default |
|---|---|---|
enabled |
Enable document chunking | false |
max_tokens |
Maximum tokens per chunk | 512 |
merge_peers |
Merge undersized chunks | true |
| Endpoint | Method | Description |
|---|---|---|
/api/convert |
POST | Upload and convert a document |
/api/convert/batch |
POST | Batch convert multiple documents |
/api/convert/<job_id>/status |
GET | Get conversion status |
/api/convert/<job_id>/result |
GET | Get conversion result |
/api/convert/<job_id>/images |
GET | List extracted images |
/api/convert/<job_id>/images/<id> |
GET | Download extracted image |
/api/convert/<job_id>/tables |
GET | List extracted tables |
/api/convert/<job_id>/tables/<id>/csv |
GET | Download table as CSV |
/api/convert/<job_id>/chunks |
GET | Get document chunks |
/api/export/<job_id>/<format> |
GET | Download converted file |
| Endpoint | Method | Description |
|---|---|---|
/api/settings |
GET/PUT | Get/update all settings |
/api/settings/reset |
POST | Reset to defaults |
/api/settings/formats |
GET | List supported formats |
/api/settings/ocr |
GET/PUT | OCR settings |
/api/settings/tables |
GET/PUT | Table settings |
/api/settings/images |
GET/PUT | Image settings |
/api/settings/performance |
GET/PUT | Performance settings |
/api/settings/chunking |
GET/PUT | Chunking settings |
/api/settings/output |
GET/PUT | Output settings |
| Endpoint | Method | Description |
|---|---|---|
/api/history |
GET | List conversion history |
/api/history/<job_id> |
GET | Get history entry |
/api/history/stats |
GET | Get conversion statistics (includes processing time, OCR/format breakdowns, queue depth) |
/api/history/search |
GET | Search history |
Backend tests:
cd backend
pytestFrontend tests:
cd frontend
npm testCI runs the same frontend test command; for Vitest + React components that listen on window after async data loads, see Frontend Tests in CONTRIBUTING.md (effect scheduling / act).
duckling/
├── backend/
│ ├── duckling.py # Flask application
│ ├── config.py # Configuration & defaults
│ ├── models/ # Database models
│ ├── routes/ # API endpoints
│ │ ├── convert.py # Conversion endpoints
│ │ ├── settings.py # Settings endpoints
│ │ └── history.py # History endpoints
│ ├── services/ # Business logic
│ │ ├── converter.py # Docling integration
│ │ ├── file_manager.py # File handling
│ │ └── history.py # History management
│ └── tests/ # Backend tests
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── DropZone.tsx
│ │ │ ├── ConversionProgress.tsx
│ │ │ ├── ExportOptions.tsx
│ │ │ ├── SettingsPanel.tsx
│ │ │ └── HistoryPanel.tsx
│ │ ├── hooks/ # Custom hooks
│ │ │ ├── useConversion.ts
│ │ │ └── useSettings.ts
│ │ ├── services/ # API client
│ │ └── types/ # TypeScript types
│ └── tests/ # Frontend tests
├── uploads/ # Temporary uploads
├── outputs/ # Converted files
└── docker-compose.yml # Docker configuration
Comprehensive documentation is available using MkDocs:
The documentation is available directly in the Duckling UI. Click the Documentation button in the header to open the docs panel.
- UI: English (
en), Spanish (es), French (fr), German (de) - Docs: Built and served with language prefixes at
/api/docs/site/en/,/api/docs/site/es/,/api/docs/site/fr/,/api/docs/site/de/
To add a new language:
- UI: add
frontend/src/locales/<lang>/common.jsonand wire it intofrontend/src/i18n.ts - Docs: add
docs/<lang>/...(mirroring the English structure), then add a language entry under thei18nplugin inmkdocs.yml
Note: The documentation must be built before it can be viewed in the UI. You can either:
-
Build manually (recommended for development): Install
backend/requirements.txt, then from the repo root runmkdocs build. That file includes the MkDocs stack (pymdown-extensions10.21.2+ ) so Pygments does not fail on fenced code without a title. -
Build from the UI: Click the "Build Documentation" button in the docs panel if the site hasn't been built yet.
-
Auto-build: The backend will automatically attempt to build the docs if MkDocs is installed and the site doesn't exist.
# MkDocs is included in backend/requirements.txt — activate that venv.
# Serve documentation with live reload (for editing)
mkdocs serveThen open http://localhost:8000 in your browser.
mkdocs buildThe built documentation will be in the site/ directory and served at /api/docs/site/ by the backend.
- Getting Started - Installation and quick start
- User Guide - Features and configuration
- Docling docs - Curated upstream Docling documentation (vendored subset)
- API Reference - Complete API documentation
- Architecture - System design and components
- Deployment - Production deployment guide
- Contributing - How to contribute
See CONTRIBUTING.md for guidelines.
See SECURITY.md for security policies.
- API hardening: History document reload (
GET /api/history/{job_id}/load) validatesjob_idusing a strict allowlist and enforces safe output directory resolution to prevent path traversal.
This project is licensed under the MIT License - see LICENSE for details.
- Docling by IBM for the powerful document conversion engine
- React for the frontend framework
- Flask for the backend framework
- Tailwind CSS for styling
- Framer Motion for animations
