SQL in Strings Desk

See and check the SQL inside your code strings, 100% offline. Free VS Code extension: colors SQL in JavaScript, TypeScript, Python, Go and Ruby strings, and checks SQL in those plus PHP strings.

const rows = await sql`
  SELECT id, email,      ⚠ Trailing comma before FROM.
  FROM users WHERE id = ${id}`;
TypeScript sql tagged template with SQL colors and a trailing-comma warning

Free

Python cursor.execute triple-quoted SQL with a FORM typo and an unclosed parenthesis in the Problems panel Go QueryRowContext raw string with SQL colors and the list of SQL strings in the file

Format SQL in place: SQL Format Desk Pro ($12 one-time)

SQL Format Desk Pro (1.0.2 or later) formats the SQL inside your JavaScript, TypeScript, Python, PHP, Go and Ruby strings in place, keeping ?, $1, :name, @name, ${}, f-string {}, %s, PHP $var and Ruby #{} intact (Ruby %Q{} literals and +-joined strings are left unchanged), with a round-trip guard that refuses any change that would lose a token. It also formats procedure bodies, reads a team .sqlformat.json and adds lint hints.

Get SQL Format Desk Pro for $12

Install

VS Code Extensions view → search zecro.sql-in-strings-desk.

Support

Bugs and ideas: zecroapp@gmail.com

© 2026 Zecro LLC, Washington, USA. MIT License.