Turn natural language into SQL and MongoDB queries. Upload your schema, ask questions, and get results with clear explanations β no coding needed. Runs fully in your browser. Private, multilingual, beginner-friendly. Supports multiple databases.
The Problem π― As a developer working with multiple databases β for research, product work, or quick prototypes β I often needed to write SQL or MongoDB queries from scratch. But thatβs not always quick or intuitive, especially across different schemas or languages.
And I realized: Iβm not the only one.
- Product managers often need answers now β not after asking an engineer - No-code and low-code builders hit walls with query syntax - Researchers and academics work with structured data but donβt always speak SQL - Founders and solo devs just want to move fast without getting stuck writing joins
The Solution π So I built Text2Query β a simple, privacy-first tool that lets you:
π Upload a schema (SQL or MongoDB) π¬ Ask questions in plain English or Spanish π§ Get valid, explainable queries instantly π Reuse and tweak results from your session π Runs entirely in your browser β no data is stored
How It Helps Me (and hopefully you too) π‘ Whether you're validating a hypothesis, exploring product metrics, or just trying to get an app working β query friction is real. I wanted a tool that removes that barrier without requiring new software, signups, or learning curves.
Built With βοΈ @Python, @Streamlit, and OpenAI β no backend, no database. Just a clean UI and prompt logic that respects your privacy. Bring your own API key and work on your terms.
Thanks for checking it out! Would love to hear your thoughts, feedback, or wild use cases π π Try it here (or give it an upvote if it makes your life easier):
Como desarrollador que trabaja con mΓΊltiples bases de datos β ya sea para investigaciΓ³n, desarrollo de producto o prototipos rΓ‘pidos β muchas veces me encontraba escribiendo consultas SQL o MongoDB desde cero.
Y no es rΓ‘pido ni intuitivo, sobre todo cuando debes cambiar de esquemas o lenguajes de consulta.
QuerΓa, y necesitaba, una herramienta ligera, fΓ‘cil y simple que eliminara esa barrera sin pedir registros, instalaciones ni curva de aprendizaje. No necesitaba funcionalidades rebuscadas y complejas, solo lo necesario.
Construido con βοΈ
@python2, @Streamlit y @OpenAI β sin backend, sin base de datos. Solo una interfaz limpia con lΓ³gica de prompts que respeta tu privacidad. Puedes usar tu propia clave API y trabajar con total control.
Β‘Gracias por echarle un vistazo! Me encantarΓa recibir tus ideas, comentarios o casos de uso mΓ‘s locos π
I love that itβs privacy-first and runs entirely in the browser. Have you thought about adding schema auto-detection from a live DB connection (read-only) so users donβt even have to upload a schema file?
@timchengbΒ Hi Tim, Iβm really glad you noticed the privacy-first approach. That was core to the design. Right now, nothing gets stored or logged, and schema files stay in memory for a single session only.
Schema auto-detection from a live database (read-only) is definitely something for next version. Basically, connect securely, introspect the schema (tables, fields, relationships), and pull just the structure. Without ever touching actual data.
Iβve held off for this lightweight MVP to keep it simple and self-contained, but a lightweight connector (PostgreSQL, SQLite, or MongoDB) is on the roadmap. Would love to hear which database youβd want support for first!
No wayβnatural language straight to database queries? I canβt count how many times Iβve fumbled with SQL syntax. Does it handle complex joins or nested queries too?
@joey_zhu_seopage_aiΒ Thank you Joey! In this lightweight version, it handles joins and filters across multiple tables well, especially when the schema includes foreign keys. It can attempt more complex nested queries, but those are still experimental and may need tweaking. Iβd love to know what kind of complex queries youβre trying to run, thatβs where I want to improve next on the next more robust version!
Report
Super helpful for me as a Product Manager! My SQL knowledge is still pretty limited but with this tool I can write my own queries to analyze the data I need to make product decisions, without having to bother my teammates for help.
@bhavyaauroraΒ Thanks! Thatβs exactly the goal βhelp non-tech folks get answers without wrangling SQL. If youβve seen common query needs in your team or org, Iβd love to hear them!
@rachitmagonΒ Thank you Rachit. For this version, a max of 10k tokens for the DB schema is the sweet spot. However, I have tested for 20k and even 40k with some good results. More than speed, accuracy is my concern. Next version will be optimized for 20k schemas and way more complex queries. Stay tuned!
Text2Query
The Problem π―
As a developer working with multiple databases β for research, product work, or quick prototypes β I often needed to write SQL or MongoDB queries from scratch. But thatβs not always quick or intuitive, especially across different schemas or languages.
And I realized: Iβm not the only one.
- Product managers often need answers now β not after asking an engineer
- No-code and low-code builders hit walls with query syntax
- Researchers and academics work with structured data but donβt always speak SQL
- Founders and solo devs just want to move fast without getting stuck writing joins
The Solution π
So I built Text2Query β a simple, privacy-first tool that lets you:
π Upload a schema (SQL or MongoDB)
π¬ Ask questions in plain English or Spanish
π§ Get valid, explainable queries instantly
π Reuse and tweak results from your session
π Runs entirely in your browser β no data is stored
How It Helps Me (and hopefully you too) π‘
Whether you're validating a hypothesis, exploring product metrics, or just trying to get an app working β query friction is real. I wanted a tool that removes that barrier without requiring new software, signups, or learning curves.
Built With βοΈ
@Python, @Streamlit, and OpenAI β no backend, no database. Just a clean UI and prompt logic that respects your privacy. Bring your own API key and work on your terms.
Thanks for checking it out! Would love to hear your thoughts, feedback, or wild use cases π
π Try it here (or give it an upvote if it makes your life easier):
https://text2query.com/
https://text2-query.streamlit.app/
Text2Query
El problema π―
Como desarrollador que trabaja con mΓΊltiples bases de datos β ya sea para investigaciΓ³n, desarrollo de producto o prototipos rΓ‘pidos β muchas veces me encontraba escribiendo consultas SQL o MongoDB desde cero.
Y no es rΓ‘pido ni intuitivo, sobre todo cuando debes cambiar de esquemas o lenguajes de consulta.
Y me di cuenta de que no era el ΓΊnico:
- Los PMs necesitan respuestas ahora β no despuΓ©s de pedir ayuda a un dev
- Los desarrolladores no-code y low-code se atascan con la sintaxis de las consultas
- Los investigadores y acadΓ©micos trabajan con datos estructurados, pero no siempre manejan SQL
- Fundadores y devs independientes quieren ir rΓ‘pido sin perder tiempo escribiendo joins
La soluciΓ³n π
AsΓ nace Text2Query β una herramienta simple y privada que te permite:
π Subir tu esquema (SQL o MongoDB)
π¬ Hacer preguntas en lenguaje natural (en inglΓ©s o espaΓ±ol)
π§ Obtener consultas listas para usar, con explicaciΓ³n incluida
π Reutilizar y editar tus propias preguntas dentro de la sesiΓ³n
π Todo se ejecuta localmente en tu navegador β no se guarda nada
Por quΓ© es ΓΊtil para mΓ (y quizΓ‘s tambiΓ©n para ti) π‘
Ya sea para validar una hipΓ³tesis, explorar mΓ©tricas de producto o simplemente hacer que una app funcione β escribir queries puede frenar el proceso o hacerlo muy frustrante.
QuerΓa, y necesitaba, una herramienta ligera, fΓ‘cil y simple que eliminara esa barrera sin pedir registros, instalaciones ni curva de aprendizaje. No necesitaba funcionalidades rebuscadas y complejas, solo lo necesario.
Construido con βοΈ
@python2, @Streamlit y @OpenAI β sin backend, sin base de datos. Solo una interfaz limpia con lΓ³gica de prompts que respeta tu privacidad. Puedes usar tu propia clave API y trabajar con total control.
Β‘Gracias por echarle un vistazo! Me encantarΓa recibir tus ideas, comentarios o casos de uso mΓ‘s locos π
π Puedes probarlo aquΓ (y si te resulta ΓΊtil, Β‘un voto positivo tambiΓ©n se agradece!):
https://text2query.com/
https://text2-query.streamlit.app/
I love that itβs privacy-first and runs entirely in the browser. Have you thought about adding schema auto-detection from a live DB connection (read-only) so users donβt even have to upload a schema file?
Text2Query
@timchengbΒ Hi Tim,
Iβm really glad you noticed the privacy-first approach. That was core to the design. Right now, nothing gets stored or logged, and schema files stay in memory for a single session only.
Schema auto-detection from a live database (read-only) is definitely something for next version. Basically, connect securely, introspect the schema (tables, fields, relationships), and pull just the structure. Without ever touching actual data.
Iβve held off for this lightweight MVP to keep it simple and self-contained, but a lightweight connector (PostgreSQL, SQLite, or MongoDB) is on the roadmap. Would love to hear which database youβd want support for first!
AltPage.ai
No wayβnatural language straight to database queries? I canβt count how many times Iβve fumbled with SQL syntax. Does it handle complex joins or nested queries too?
Text2Query
@joey_zhu_seopage_aiΒ Thank you Joey!
In this lightweight version, it handles joins and filters across multiple tables well, especially when the schema includes foreign keys. It can attempt more complex nested queries, but those are still experimental and may need tweaking. Iβd love to know what kind of complex queries youβre trying to run, thatβs where I want to improve next on the next more robust version!
Super helpful for me as a Product Manager! My SQL knowledge is still pretty limited but with this tool I can write my own queries to analyze the data I need to make product decisions, without having to bother my teammates for help.
How is it different from ChatGPT?
Text2Query
@aeejazkhanΒ Great question! Text2Query actually uses AI, but thatβs just one part of the system, not the whole thing.
The app includes a lot of old-fashioned, well-structured code to do the things ChatGPT alone canβt:
π§± It parses your actual schema into structured relationships
π§ Builds optimized, task-specific prompts based on schema + intent
π Handles token counting, validation, query formatting, explanation, and history
π¦ Wraps it all in a purpose-built UI that guides users and protects against errors
With raw ChatGPT, youβd need to:
Heavily engineer and test your own prompt templates
Fix hallucinated fields, joins, or logic manually
Rebuild everything if the schema or query type changes
And still you will need a lot of programming to get some degree of determinism that Gen-AI cannot provide by itself.
Text2Query removes all of that friction, and saves you hours. Itβs fast, safe, repeatable, and designed specifically for SQL/Mongo workflows.
So yes, it uses AI, but AI is the assistant, not the product. The value is in the whole system.
Kandid
Text2Query looks like a super handy for non-tech folks who need quick database queries without touching SQL syntax.
Text2Query
@bhavyaauroraΒ Thanks! Thatβs exactly the goal βhelp non-tech folks get answers without wrangling SQL. If youβve seen common query needs in your team or org, Iβd love to hear them!
Smoopit
The Streamlit implementation is lean. What's the largest schema size you've tested while maintaining good response times? @jo_rangel
Text2Query
@rachitmagonΒ Thank you Rachit. For this version, a max of 10k tokens for the DB schema is the sweet spot. However, I have tested for 20k and even 40k with some good results. More than speed, accuracy is my concern. Next version will be optimized for 20k schemas and way more complex queries. Stay tuned!