Lowercase supported SQL keywords while preserving common quoted text and comment forms. Review the dialect limits below before using the result.
How to lowercase SQL keywords
- Paste a query or script in SQL input.
- Select Lowercase Keywords to create the converted text.
- Review the output, then choose Copy Output. Editing the input clears the old output so you do not copy an outdated conversion.
Example
Input:
SELECT CustomerName FROM Customers WHERE Status = 'ACTIVE';Output:
select CustomerName from Customers where Status = 'ACTIVE';The keywords change case while the ordinary names and quoted value stay as entered. Whitespace, indentation and line breaks are retained. This tool does not execute the SQL or connect to a database.
What the converter preserves
The scanner skips single-quoted strings, double-quoted text, backtick-quoted names and square-bracketed identifiers. It also skips dollar-quoted blocks such as $SELECT$ and $body$SELECT$body$, line comments beginning with -- or #, and block comments including nested /* ... */ pairs. Doubled quote delimiters are preserved.
Limits to review before using the result
This is a keyword-list converter, not a complete SQL parser. An unquoted identifier that matches a listed word, such as COUNT, can also be lowercased. The tool cannot determine whether that word is a function, alias or object name in your database.
For conservative text preservation, backslash escapes are recognized inside quoted text and bracketed sections are left untouched. Your SQL mode may interpret those characters differently. Oracle alternative quoting and other vendor-specific literal syntaxes are not fully supported. Review scripts that use them in a dialect-aware editor.
Dollar tags use ASCII letters, digits and underscores here, with a letter or underscore first. Unclosed recognized quotes or comments leave the remainder unchanged. Unknown keywords stay unchanged; the tool does not validate syntax or guarantee equivalent execution. Input is limited to 500,000 characters.
Supported words
SELECT, FROM, WHERE, AS, AND, OR, NOT, NULL, IS, IN, BETWEEN, LIKE, ILIKE, JOIN, INNER, LEFT, RIGHT, FULL, OUTER, CROSS, ON, GROUP, BY, ORDER, HAVING, LIMIT, OFFSET, DISTINCT, UNION, ALL, INSERT, INTO, VALUES, UPDATE, SET, DELETE, CREATE, ALTER, DROP, TABLE, VIEW, INDEX, DATABASE, SCHEMA, PRIMARY, KEY, FOREIGN, REFERENCES, CONSTRAINT, DEFAULT, CHECK, UNIQUE, CASE, WHEN, THEN, ELSE, END, EXISTS, ASC, DESC, WITH, RECURSIVE, RETURNING, OVER, PARTITION, WINDOW, CAST, COALESCE, COUNT, SUM, AVG, MIN and MAX.
SQL dialect references
For exact language rules, see PostgreSQL lexical structure and SQL Server identifiers. Quoting and keyword rules vary by database and configuration.