DuckDB Viewer
Browse and query DuckDB databases, CSV, Parquet, and JSON files directly inside VS Code.
.parquet, .duckdb, .ddb, .csv, .json, .jsonl, .ndjson, and .db files, right-click and select Open with DuckDB Viewer.
Features
- Open —
.parquet, .duckdb, and .ddb files open in the viewer on Right-click -> Open with DuckDB Viewer
- Multi-format support — CSV, Parquet, JSON, JSONL, NDJSON, and DuckDB database files
- SQL editor — CodeMirror 6 with syntax highlighting, bracket matching, and search
- Autocomplete — DuckDB keywords, functions, and live table/column names
- Schema tree — expandable sidebar showing tables, columns, types, and row counts
- Data profiling — one-click SUMMARIZE with min, max, avg, std, quartiles, null%, and unique count
- Export to file — save query results to CSV, Parquet, or JSON files on disk
- DESCRIBE table — right-click any table in the schema tree for column details
- Column sorting — click headers to sort ASC/DESC
- Cell preview — click any cell to see full content with JSON auto-formatting
- Query history — last 50 queries stored and accessible via dropdown
- Data grid — paginated results with zebra striping, column resizing, and row numbers
- Copy results — copy as CSV or formatted JSON
- Theme-aware — respects your VS Code dark/light theme
- Refresh — reconnect and reload if the file changes on disk
Install
Search for DuckDB Viewer in the VS Code extensions marketplace, or:
code --install-extension caioricciuti.vs-duckdb-viewer
Build locally
Prerequisites: Node.js 20+, npm
git clone https://github.com/caioricciuti/vs-duckdb-viewer.git
cd vs-duckdb-viewer
npm install
npm run build
Test in VS Code
- Open this folder in VS Code
- Press
F5 to launch the Extension Development Host
- Double-click a
.parquet or .duckdb file — opens automatically
- Right-click a
.csv or .json file → Open with DuckDB Viewer
Package
npm run package
Note: The extension uses native DuckDB bindings. For distribution, build platform-specific packages:
npm run package:darwin-arm64
npm run package:darwin-x64
npm run package:linux-x64
Keyboard shortcuts
| Action |
Shortcut |
| Run query |
Ctrl+Enter / Cmd+Enter |
| Explain query |
Ctrl+Shift+Enter / Cmd+Shift+Enter |
| Focus editor |
Ctrl+L / Cmd+L |
| Close modal |
Escape |
Tech stack
- TypeScript + esbuild (dual build: extension + webview)
@duckdb/node-api (native DuckDB bindings)
- CodeMirror 6 (SQL editor, autocomplete, syntax highlighting)
- VS Code CSS variables for theming
License
MIT
| |