A lightweight web application that transforms CSV and Excel files into SQL code automatically. Upload your data files and generate ready-to-use CREATE TABLE and INSERT INTO statements.
- Multi-format Support: Upload CSV and Excel files
- Table Customization: Rename your database table before generating SQL
- Column Selection: Choose which columns to include or exclude from the output
- Complete SQL Generation:
- CREATE TABLE statements with proper column definitions
- INSERT INTO statements for all data rows
- Modern Interface: Clean, centered, and responsive design
- Copy & Download: Easy copy-to-clipboard or download SQL files
- Data Validation: Handles empty cells, trims whitespace, and removes empty rows
- Real-time Preview: See your SQL output update as you make changes
- Node.js (version 14 or higher)
- npm or yarn package manager
-
Clone the repository
git clone https://github.com/vincenzo113/sqlify.git cd sqlify -
Install dependencies
npm install
-
Start the development server
npm start
-
Open your browser Navigate to
http://localhost:3000
The project uses the following main libraries:
- React: Frontend framework
- Papa Parse: CSV parsing and processing
- SheetJS: Excel file reading and parsing
- Click on "Choose File" or drag and drop your CSV/Excel file
- Supported formats:
.csv,.xlsx
- The app automatically generates SQL code in the text area
- CREATE TABLE statement
- INSERT INTO statements for your data
- Rename Table: Modify the table name in the generated SQL
- Select Columns: Use the column selector to include/exclude specific columns
- Changes update the SQL output in real-time
- Copy: Click "Copy" to copy SQL to clipboard
- Download: Click "Download" to save as
.sqlfile
- Click "Paste" to manually input CSV or Excel data
- Useful for quick conversions without file uploads
id,name,email,age,created_date
1,John Doe,[email protected],28,2023-01-15
2,Jane Smith,[email protected],34,2023-01-16
3,Bob Johnson,[email protected],25,2023-01-17
CREATE TABLE my_table (
id VARCHAR,
name VARCHAR(,
email VARCHAR,
age VARCHAR,
created_date VARCHAR
);
INSERT INTO my_table (id, name, email, age, created_date) VALUES
(1, 'John Doe', '[email protected]', 28, '2023-01-15'),
(2, 'Jane Smith', '[email protected]', 34, '2023-01-16'),
(3, 'Bob Johnson', '[email protected]', 25, '2023-01-17');- Database-specific SQL dialects (MySQL, PostgreSQL, SQLite, SQL Server)
- Advanced type inference with custom type mapping
- Batch file processing for multiple files
- SQL query builder for SELECT statements
- Data preview table before SQL generation
- Import from other different formats (JSON, XML)
- Schema validation and constraint generation
- Dark mode theme support
- Large files (>50MB) may cause performance issues
- Date format detection limited to common formats
- No support for nested JSON structures in CSV
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React
- CSV parsing powered by Papa Parse
- Excel support via SheetJS
Made with ❤️