# Doc Bench

> Local-first browser studio for documents and PDFs, designed to edit, inspect and export without uploading source files.

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

## 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.
- 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 and the application has no telemetry. On WebMCP-capable browser hosts, `read_document`, `set_document_text`, `validate_document`, `format_document` and `inspect_document` operate on the visible editor state. Returned tool results can contain document text and are then subject to 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