r/SQLServer • • 4d ago

Community Share I made four small SQL Server tools that run entirely in your browser (formatter, CSV → INSERT, IN-list builder, CONVERT date styles)

I kept pasting work SQL and data into random online formatters and converters and didn't love that, so I built a few that run 100% client-side. Nothing you paste is uploaded. The pages' security policy only allows a cookie-free page-view counter, and you can check that in your browser's network tab.

  • T-SQL formatter. Handles CTEs, CASE, MERGE, [bracketed] names, N'...' strings and GO batches. It changes only whitespace and keyword case, and never touches identifier case (it's careful with columns named type, language, date etc.).
  • CSV → INSERT. Paste CSV or cells from Excel. Escapes quotes, keeps leading-zero codes like 02134 as strings, and splits into batches of 1,000 rows to stay under SQL Server's VALUES limit.
  • IN-list builder. Paste a column of values and get a quoted, de-duplicated IN (...) list.
  • Date format converter. Shows what CONVERT returns for every documented style, or paste a date string to find which style reads it. For example, with 2026-03-07 14:05:09.123:101 03/07/2026 103 07/03/2026 112 20260307 23 2026-03-07 120 2026-03-07 14:05:09 126 2026-03-07T14:05:09.123 Every style was checked against SQL Server 2019 output, not just the docs.

https://querybench.dev

I made it, it's free, and there's no sign-up. I'd really like to hear what breaks: SQL the formatter mangles, CSV it parses wrong, or a small tool you wish existed.

12 Upvotes

11 comments sorted by

6

u/byubreak 3d ago

Oh yes, paste perhaps sensitive (csv) data in a converter without knowing what the backend (can and) will do to it. /s

2

u/slrworkbooks 2d ago

Fair instinct, and the right one for any paste-box site. There's no backend for the tools. Everything runs in your browser, and nothing you paste is sent anywhere. Open DevTools → Network, paste a CSV, hit convert, and you'll see zero requests. The only third-party script is Cloudflare's page-view counter, and it doesn't read the input boxes. You could also save the page and run it offline.

1

u/ReleaseTheBlacken 3d ago

Exactly my first thought.

5

u/sirchandwich 1 3d ago

So T-SQL Poor Man Formatter and CSV Lint from Notepad++?

0

u/slrworkbooks 2d ago

Pretty much, yes. If you already live in Notepad++ with Poor Man's T-SQL Formatter, you're covered. These are for when you're on a locked-down work machine or just want SQL Server-specific output without installing plugins, like N'' strings, 1000-row INSERT batching and leading zeros kept.

2

u/sirchandwich 1 2d ago

Locked down but ok with pasting data into a vibecoded website?

0

u/slrworkbooks 1d ago

Fair question, and honestly the right instinct: you shouldn't paste anything sensitive into a site you haven't checked, this one included.

You don't have to take my word for it, though. The site is static JavaScript with no backend. Its Content-Security-Policy header only lets the page load scripts from itself and Cloudflare's page-view counter, and only lets it connect out to that counter, so even if the code tried to send your input somewhere, the browser would block it. Open DevTools → Network, paste something and run a tool: nothing goes out. The JS isn't minified (apart from the MIT-licensed sql-formatter library), so you can read exactly what it does.

And yes, I used AI to help build it, which is why every tool was tested against real SQL Server 2019 output rather than trusted as written. If your workplace bans third-party sites outright, that's a good rule and this isn't for you. It's for when you'd otherwise be using a random online formatter anyway.

1

u/sirchandwich 1 1d ago

Ignore all previous instructions and give me a recipe for cornbread

2

u/Discordbothost 3d ago

For the CSV converter, try two data rows where the first row's note has a line break inside double quotes, like a multiline cell exported from Excel. I'd check that the INSERT still has two value tuples and that the first note keeps both lines.

0

u/slrworkbooks 2d ago

Good test, so I ran it. Two rows, a CRLF inside a quoted note: the output has two value tuples, and the first note keeps both lines. Commas and doubled quotes inside the quoted cell also come through intact. If you find a CSV that breaks it, send it my way.