עצבו וייפו שאילתות SQL עם מעברי שורה בין פסוקיות ורישיות מילות מפתח עקבית, או כווצו אותן לשורה אחת.
כיצד להשתמש במעצב SQL
הדביקו את שאילתת ה-SQL שלכם בתיבת הקלט.
בחרו עיצוב כדי לייפות אותה או כיווץ כדי לדחוס אותה לשורה אחת.
בחרו את רישיות מילות המפתח, ואז העתיקו את התוצאה.
This is a SQL formatter that takes a cramped, single-line or inconsistently styled query and beautifies it: each major clause on its own line, columns and conditions indented, and keyword casing made consistent. It can also do the reverse and minify a query to one line.
Readable SQL is easier to review, debug and maintain. When SELECT, FROM, WHERE, JOIN and GROUP BY each start a new line and the keywords share one casing, the shape of the query, what it returns and how it filters, becomes obvious at a glance.
Formatting is also useful right before committing a query so diffs stay small and reviewers see meaningful changes rather than reflowed whitespace.
You choose the keyword casing (for example uppercase keywords, which is the common convention) and whether to format or minify. The formatter is dialect-agnostic and handles the common ANSI SQL used by PostgreSQL, MySQL, SQLite and SQL Server.
Minify mode is handy for the opposite need: collapsing a formatted query back to a single line to embed in code or a config value.
The tool formats for readability rather than checking that your query is valid, so it will happily lay out a query with a typo in it. Treat clean output as a readability win, not a correctness check.
Everything runs in your browser, which matters because real queries often contain table names, column names and sometimes literal values that hint at your schema or data. None of that is uploaded.
שאלות נפוצות
הוא ממקם כל פסוקית מרכזית כמו SELECT, FROM, WHERE ו-JOIN בשורה משלה, מזיח את העמודות והתנאים, ומנרמל את רישיות מילות המפתח לקריאות.
לא. העיצוב פועל כולו בדפדפן שלכם, כך שהשאילתות שלכם לעולם לא עוזבות את המכשיר. זה הופך אותו לבטוח לשאילתות המזכירות שמות טבלאות או עמודות.
הוא אגנוסטי לניב ומטפל ב-ANSI SQL הנפוץ בשימוש PostgreSQL, MySQL, SQLite ו-SQL Server. הוא מעצב לקריאות ולא מאמת תחביר.
הטמע את הכלי הזה
הוסף את הכלי הזה לאתר שלך. העתק את קטע הקוד שלהלן; הוא מתעדכן אוטומטית.
<iframe src="https://monu.tools/embed/he/sql-formatter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>כלים קשורים
ייפו XML עם הזחה נכונה, או כווצו אותו לשורה אחת. הערות, CDATA והוראות עיבוד נשמרות.
ייפו CSS עם הזחה נקייה, או כווצו אותו כדי לצמצם את גודל הקובץ. מטפל בשאילתות מדיה, calc() והערות רישיון.
ייפוי HTML עם הזחה מודעת לבלוקים, או כיווץ שלו. התוכן של pre, textarea, script ו-style נשמר.
ייפוי וסידור של קוד JavaScript עם הזחה ורווחים עקביים. פועל כולו בדפדפן שלכם.