# Doc Bench

> Local-first file workbench with contextual text, PDF and DOCX tools. Source files remain in the browser.

Doc Bench runs at https://docbench.travny.workers.dev/.

## Files (start here)

- Import local files and folders, then search, sort, inspect detected signatures and preview without uploads.
- Open supported text and PDF files in their specialist tools; convert DOCX through the existing local converter.
- Preview images, audio, video and ZIP indexes when supported. Unsupported formats still show bounded properties and diagnostics.
- Removing items from the workspace does not delete source files on disk.

## Documents

- Edit arbitrary UTF-8 text and recognize TXT/Markdown, JSON-family, YAML/XML, INI/config, Batch/CMD, PowerShell, shell/dotfiles, .env and M3U/M3U8/PLS playlist files, with conservative content detection for generic or unknown filenames.
- Validate and format structured text, plus minify or explicitly repair JSON-family documents; scripts and loose configs remain raw to avoid unsafe rewrites.
- Save directly back to an opened file only when the browser grants a writable file handle; otherwise use Save as or download an edited copy.
- Inspect Markdown, JSON-family formats, YAML and XML with richer previews.
- Undo/Redo changes in the editor using toolbar controls or Ctrl/Cmd+Z,
  Ctrl+Y and Ctrl/Cmd+Shift+Z. Held Backspace is one reversible step.
  History resets on open/merge/new; Undo never reverses disk writes.
- Review text-inspection repairs for hidden separators, bidi and control
  characters. Normalize unusual spaces only when selected. Inspect changes
  before Apply; Undo is available. Truncated/contextual findings stay manual.
- Preserve UTF-8 BOM and LF, CRLF or CR line endings unless deliberately changed.
- Merge multiple TXT/Markdown files in picker order into a new editable document; mixed TXT/Markdown output becomes Markdown.
- Save back to a selected local file in supported browsers or download the result.

## PDFs

- Convert DOCX to PDF locally, then continue editing the converted PDF in the same workspace.
- Export the current PDF to DOCX with page order and text preserved; PDF bookmarks become Word headings/bookmarks.
- Preview PDFs locally.
- Merge files and reorder or delete pages.
- Inspect and edit bookmark trees while remapping targets after page changes.
- Apply lossless optimization, optional lossy image recompression and Fast Web View.
- Rebuild and verify the result before download.

## Privacy and agent access

Files stay in the browser; the application has no telemetry. On WebMCP
hosts, `read_document`, `set_document_text`, `validate_document`,
`format_document`, `inspect_document` and read-only
`preview_document_repairs`, `undo_document` and `redo_document` use
the visible editor state.
Repair previews return counts, offsets, codepoints and operations, not
source text; applying repairs requires the visible UI. Other tool results
can contain document text and follow the host/model data-handling policy.

## Links

- [Application](https://docbench.travny.workers.dev/)
- [Concise LLM guide](https://docbench.travny.workers.dev/llms.txt)
- [Full LLM guide](https://docbench.travny.workers.dev/llms-full.txt)
- [Source](https://github.com/travnie/twojstar/tree/main/benches/docbench)
- [Portable builds](https://github.com/travnie/twojstar/releases/latest)
\n### Smart JSON merge\n\nMerge JSON/JSONC objects recursively or concatenate array roots while preserving source scalar lexemes, including large numeric IDs. Scalar/type conflicts are reported and later files win. JSONL/NDJSON inputs are validated record-by-record and concatenated. JSON5 is not included in smart merge yet.\n