Query CSV, JSON, and Parquet files with SQL directly in your browser
SQL for Files is a privacy-first, browser-based SQL query interface that allows you to analyze your data files without uploading them anywhere. All processing happens locally in your browser using WebAssembly technology.
Perfect for data analysts, developers, and anyone who needs to quickly query data files without installing database software or uploading sensitive data to cloud services.
- Zero server uploads - Your data never leaves your device
- All processing happens client-side in your browser
- No data collection, no tracking, no analytics
- Files stored locally in IndexedDB for session persistence
- CSV - Automatic delimiter detection and type inference
- JSON - JSON arrays and newline-delimited JSON (NDJSON)
- Parquet - Columnar format with built-in compression
- Monaco Editor (VS Code's editor) with SQL syntax highlighting
- Smart autocomplete for tables, columns, and SQL keywords
- Keyboard shortcuts (Ctrl/Cmd + Enter to execute)
- Execute selected SQL or entire query
- Complex queries with JOINs across multiple files
- Window functions and aggregations
- CTEs (Common Table Expressions) and subqueries
- Complete analytical SQL capabilities
- Export query results to CSV (with full dataset, not just displayed rows)
- Export/import entire database as ZIP bundles
- View table schemas with column types and nullability
- Multi-file table management
- Data Analysis - Explore CSV/JSON exports, analyze API responses, join multiple data sources
- Data Engineering - Test SQL queries, validate transformations, debug pipeline outputs
- Business Intelligence - Ad-hoc analysis, data quality checks, combine data from different systems
- Education - Learn and practice SQL without database installation
- Frontend Framework: React 19 + TypeScript
- Build Tool: Vite 7
- Database Engine: DuckDB WASM 1.33
- SQL Editor: Monaco Editor
- Data Processing: Apache Arrow
- File Handling: React Dropzone
- Styling: Tailwind CSS 4
- State Management: React Context API
- Persistence: IndexedDB (via idb-keyval)
Visit sqlforfiles.app and start querying immediately - no installation required!
-
Clone the repository
git clone https://github.com/graflinger/sql-for-files.git cd sql-for-files -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open in browser
Navigate to http://localhost:5173
npm run build
npm run preview- Upload a data file (CSV, JSON, or Parquet)
- Select a table from the sidebar to view its schema
- Write a SQL query in the editor
- Press Ctrl/Cmd + Enter to execute
- Export results to CSV or save the entire database as a ZIP
-- Query a CSV file
SELECT * FROM my_data LIMIT 10;
-- Aggregate data
SELECT category, COUNT(*), AVG(price)
FROM products
GROUP BY category
ORDER BY AVG(price) DESC;
-- Join multiple files
SELECT o.order_id, c.customer_name, o.total
FROM orders o
JOIN customers c ON o.customer_id = c.id
WHERE o.order_date > '2024-01-01';
-- Window functions
SELECT
name,
salary,
RANK() OVER (ORDER BY salary DESC) as salary_rank
FROM employees;- Client-side processing - All data processing happens in your browser
- Local storage only - Files stored in IndexedDB, never sent to servers
- No tracking - Zero analytics, no usage data collection
- Open source - Audit the entire codebase on GitHub
Contributions are welcome! By contributing, you agree that your contributions will be licensed under the AGPL v3 license.
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add YourFeature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.
AGPL v3 is specifically designed for web applications and ensures that:
- ✅ You can freely use, modify, and study the code
- ✅ Anyone who deploys a modified version publicly must share their source code with users
- ✅ Prevents proprietary forks - competitors can't take the code and run closed-source versions
- ✅ Protects the commons - improvements benefit everyone in the community
This license ensures SQL for Files remains open source while preventing others from running proprietary versions of the service.
- DuckDB - High-performance analytical database
- DuckDB WASM - WebAssembly port
- Monaco Editor - Code editor
- Apache Arrow - Columnar data format
- React - UI framework
- Query history and saved queries
- Parquet and JSON export from query results
- Dark mode support
- Query result visualization (charts)
- Table preview with sampling
- Website: sqlforfiles.app
- Issues: GitHub Issues