tools
SQL to JsonLogic converter
Turn a WHERE clause into a JsonLogic rule: the same condition, as JSON you can store and evaluate anywhere.
- free
- no sign-up
- runs in your browser
- MIT
input · SQL
output · JsonLogic
5 rules · 5 fields · converted Runs in your browser: nothing leaves it.
How it converts
The output follows the conventions react-querybuilder and react-awesome-query-builder use: == and != for equality, in for lists, a three-argument <= for BETWEEN, and startsWith/endsWith/in for LIKE patterns.
JsonLogic compares case-sensitively and coerces null like JavaScript does, so a rule can behave differently from SQL on NULLs and collations. The qnot docs list each difference.
Use it in your app
follows your input and settingsThe converter is qnot's codecs. Declare the fields once and the same two calls run on your server or in the browser, typed end to end.
Questions
- Is my query sent anywhere?
- No. The converter is qnot running in your browser: parsing, schema inference and conversion all happen on this page, and nothing you paste leaves your browser.
- What are startsWith and endsWith in the output?
- JsonLogic has no LIKE. qnot writes prefix and suffix matches as startsWith and endsWith operations, as react-querybuilder does; add them to json-logic-js with add_operation if your evaluator lacks them.
- Why does it show a schema?
- qnot's codecs are typed by a schema. The tool infers a permissive one from your input (numbers, booleans, dates, lists, nested arrays), so you can paste any query. In your app you declare the fields once with defineFields and get the same conversion with exact types.
More converters
Every format qnot speaks- SQL → MongoDBSQL to MongoDB converter
- MongoDB → SQLMongoDB to SQL converter
- JsonLogic → SQLJsonLogic to SQL converter
- JsonLogic → MongoDBJsonLogic to MongoDB converter
- SQL → ElasticsearchSQL to Elasticsearch converter
- react-querybuilder → SQL · MongoDB · JsonLogicreact-querybuilder to SQL converter
- RAQB → SQL · MongoDB · JsonLogicRAQB tree to SQL converter