Tools Developer Tools SQL Keywords Uppercase

SQL Keywords Uppercase: Capitalize SQL Reserved Words

Developer Tools Active

Convert SQL reserved words to capitals in your browser. Quoted names, strings, and comments are left unchanged.

SQL Keywords Uppercase

SQL Keywords Uppercase

Convert SQL reserved words to uppercase. Text inside strings, comments, and quoted identifiers is left unchanged.

Casing Tool
Keywords Uppercased
7
Output Size
114 B
Status
Processed

Rate This Tool

Your feedback helps others discover great tools

–
out of 5
No ratings yet

Tap a star to rate:

About This Tool

Ever opened a SQL script where select, from, and where blend into the table names? The SQL Keywords Uppercase tool scans your query and puts matched reserved words into capitals. Most of your identifiers keep the case you typed.

This tool helps developers, analysts, and students who want one consistent style. You paste a query on the left, and the uppercased version appears on the right as you type.

Table of Contents

  • What the Tool Does
  • How to Use It, Step by Step
  • How the Conversion Works
  • Worked Example
  • How to Read the Results
  • What Gets Changed and What Does Not
  • Limitations and Assumptions
  • FAQs About the SQL Keywords Uppercase

What the Tool Does

The tool matches a fixed list of about 48 common SQL keywords. It rewrites each match in uppercase and leaves the surrounding text alone.

  • Raw SQL Input: a text box that holds the query you want to change.
  • Uppercased Keywords Output: a read-only box with the converted query.
  • Keywords Uppercased: a count of the words whose case the tool changed.
  • Output Size: the UTF-8 byte size of the output, shown with a "B" label.
  • Status: reads Processed when output exists, or Idle when the input is empty.
  • Clear empties the input, and Copy SQL copies the output.

The keyword list covers clauses like SELECT, FROM, WHERE, JOIN, and GROUP BY. It also covers functions like COUNT, SUM, AVG, MIN, and MAX.

How to Use It, Step by Step

  1. Type or paste your query into the Raw SQL Input box.
  2. Watch the Uppercased Keywords Output box update as you type.
  3. Check the Keywords Uppercased count to see how many words changed.
  4. Press Copy SQL to place the output on your clipboard.
  5. Press Clear to empty both boxes and start over.

How the Conversion Works

The tool first splits your query into code and quoted regions. It then matches keywords only inside the code regions. Each match is replaced with its uppercase spelling in one pass.

Raw SQL+Split Out Quotes=Match and Replace=Uppercased SQL

The tool uses word boundaries, so a keyword must stand alone. The letters in "join" keep "in" from matching inside it.

Multi-word keywords allow any spacing between the words. So "GROUP BY", "group by" with two spaces, and even a line break all match.

Worked Example

Devon loads the sample query that ships with the tool. It is a lowercase SELECT statement with a filter, a sort, and a row limit.

FieldValue
Inputselect id, name, email from users where status = 'active' and created_at > '2023-01-01' order by id desc limit 50;
OutputSELECT id, name, email FROM users WHERE status = 'active' AND created_at > '2023-01-01' ORDER BY id DESC LIMIT 50;
Keywords Uppercased7
Output Size114 B

The seven changes are SELECT, FROM, WHERE, AND, ORDER BY, DESC, and LIMIT. The names id, name, and email keep their lowercase spelling.

How to Read the Results

The Uppercased Keywords Output box holds the query you copy into your editor. It carries your punctuation and layout straight through.

Overlapping phrases are no longer added twice. The clause LEFT JOIN counts as one change, and DELETE FROM counts as one change.

So a short statement like "delete from users" raises the count by one. A join line such as "left join t2 on ..." raises it by two.

The Status card reads Processed while output exists. It switches to Idle the moment the input is empty.

What Gets Changed and What Does Not

The tool does not read your database schema or fully parse the query. It cannot always tell a keyword from an identifier with the same spelling.

If a column is named count and left unquoted, the tool rewrites it as COUNT. The words order, index, table, end, and set carry the same risk.

Strings and comments are left as you wrote them. The value in "set note = 'select from the menu'" keeps its lowercase words.

For deeper cleanup, the SQL formatter adds indentation and line breaks. The SQL beautifier focuses on readable layout, while the SQL minifier strips a query down to one line.

Limitations and Assumptions

  • The list is fixed, so dialect words like ILIKE, RETURNING, or WITH are not covered.
  • An unquoted column or alias that spells a keyword is still uppercased.
  • Conversion runs live as you type, with no separate step to confirm the change.
  • There is no cap on input length, so very large scripts may feel slow.
  • The tool handles case only and does nothing to the structure of your query.

To confirm a query still parses, try the SQL validator. You can browse more utilities in the developer tools hub.

FAQs About the SQL Keywords Uppercase

Does This Tool Change My Table and Column Names?

Only when a name is unquoted and spells a keyword in its list. Wrap the name in quotes, backticks, or brackets, and the tool leaves it alone.

What Does the Keywords Uppercased Count Mean?

It is the number of words whose case the tool actually changed. A word that was already in capitals does not add to the count.

Does Output Size Show Bytes or Characters?

It reports the true UTF-8 byte length of the output. Most plain letters take one byte, while an accented letter can take two.

Will It Reformat or Indent My Query?

No. It changes the letter case of matched keywords only. Your spacing and line breaks stay exactly as you typed them.

Can I Convert Keywords Back to Lowercase?

Not here. This tool only makes keywords uppercase. For the reverse style, use the SQL keywords lowercase tool instead.

Does It Check Whether My SQL Is Valid?

No. It never runs or parses your query to find errors. It simply changes the case of the keywords it knows.

This calculator gives general estimates only and is not professional advice. Reviewed for general accuracy by Prof. Dr. Khalil Mudassar, PhD.

Category: Developer Tools

You May Also Like

View All