[DB] QueryCraft

Natural Language → SQL. Powered by Groq AI.

[*] Star on GitHub Get Free Groq API Key

Free at console.groq.com · Stored only in your browser's localStorage · Never sent anywhere except Groq's API

Paste your CREATE TABLE statements
Describe in plain English

Example Queries

"Show users who signed up this week"
SELECT *
FROM users
WHERE created_at >= NOW() - INTERVAL '7 days'
"Count orders by status"
SELECT status, COUNT(*) AS count
FROM orders
GROUP BY status
"Users with no orders"
SELECT u.*
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE o.id IS NULL

Why developers use QueryCraft

Plain English to SQL

Describe what you need in natural language — QueryCraft uses Groq AI (llama-3.3-70b) to generate clean, production-ready SQL with proper aliases, explicit JOINs, and dialect-correct syntax.

5 SQL Dialects

Generate SQL for PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), or Google BigQuery. Each dialect respects its own date functions, string operators, and pagination syntax.

Step-by-step Explanation

Every generated query comes with a plain English breakdown of each clause — perfect for learning SQL, code reviews, or sharing queries with non-technical teammates.

Performance Tips

QueryCraft flags missing indexes, suboptimal JOIN order, and full-table scan risks before you run the query in production. Catch slow queries at generation time.

No Backend, No Signup

Everything runs in your browser. Your schema never leaves your machine except for the Groq API call. No account, no server, no data retention. Open source under MIT.

In-Browser Testing

Instantly test your generated SQL against auto-generated sample data. QueryCraft parses your CREATE TABLE schema and produces realistic fake rows — no database connection needed.

Frequently Asked Questions

What is QueryCraft?

QueryCraft is a free, browser-based AI SQL generator. You paste your database schema (CREATE TABLE statements), describe what you want in plain English, choose a SQL dialect, and receive a production-ready SQL query — along with a step-by-step explanation and performance optimization suggestions.

Is QueryCraft free to use?

Yes, completely free. You need a Groq API key, which is also free at console.groq.com. Groq's free tier is generous enough for personal and small-team use. No credit card required.

Which SQL dialects are supported?

QueryCraft supports PostgreSQL, MySQL, SQLite, SQL Server (T-SQL), and Google BigQuery. The AI generates syntax that is specific to each dialect — for example, ILIKE for PostgreSQL, TOP vs LIMIT for SQL Server vs MySQL, and BigQuery-specific date functions.

Is my schema or API key stored?

Your API key is stored only in your browser's localStorage and is never sent anywhere except directly to Groq's API. Your schema and query text are sent to Groq for processing and are not stored on any external server. QueryCraft has no backend.

How accurate is the generated SQL?

QueryCraft uses Groq's llama-3.3-70b model, which produces accurate SQL for common query patterns. Always review generated SQL before running it in production. The step-by-step explanation tab makes it easy to verify the logic.