What does this tool do
The File Reader opens and reads PDF, Word (.docx), Excel (.xlsx), CSV, Markdown, and text/code files directly in your browser. Desktop-style reader with a navigation sidebar. No upload—files stay on your device. Supports PDF (via PDF.js), Word (via mammoth), Excel (via SheetJS), CSV (custom parser), Markdown (via marked), and plain text. Ideal for viewing documents and code without leaving the browser.
How to use it
- Open file — Click to select a file or drag and drop. Supported: PDF, DOCX, XLSX, CSV, MD, TXT, and many code extensions.
- Navigate — Use the sidebar to jump to PDF pages, Word headings, Excel sheets, or Markdown sections.
- Read — Content renders in the main area. PDF shows pages; spreadsheets show cells; Markdown shows rendered HTML.
- Switch files — Open another file; the previous one is replaced (no multi-tab).
- No upload — Files are read locally; nothing is sent to a server.
How it works
Format is detected by file extension. PDF uses pdfjs-dist; Word uses mammoth (DOCX to HTML); Excel uses xlsx/SheetJS; CSV uses a custom parser with quoted-field support; Markdown uses marked. Content is read via FileReader, File.text(), or File.arrayBuffer(). Headings are extracted for the sidebar and injected with IDs for anchor links. All processing is client-side—files never leave the device.
All computation runs entirely in your browser. No data is sent to any server.
Use cases & examples
- PDF viewer — Read PDFs without a desktop app.
- Document review — Quick view of Word or Excel files.
- Code inspection — Read source files with syntax-friendly display.
- CSV analysis — View spreadsheet data in table form.
- Offline — Works fully offline once loaded.
Example
- Open report.pdf → Pages in sidebar, click to jump.
- Open data.xlsx → Sheet tabs, rows and columns in table.
- Open readme.md → Rendered Markdown with heading links.
Limitations & known constraints
- Library correctness — pdfjs-dist, mammoth, xlsx correctness is trusted; not independently verified.
- PDF.js worker — Loaded from unpkg CDN at runtime.
- CSV — Handles quoted fields; full RFC 4180 compliance not guaranteed.
- File size — Very large files may slow or exhaust memory.
- Single file — One file at a time; no multi-document view.