Skip to content
BEAD

SQL Minifier

Strip comments and whitespace from SQL while preserving string literals and identifiers.

Minified (235 chars, −23.2%)
</>Use this tool programmaticallycurl · JavaScript · MCP

Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.

curl
curl https://api.b-e-a-d.com/tools/sql-minifier/run \
  -H "Content-Type: application/json" \
  -d '{
  "input": "your input here"
}'
JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/sql-minifier/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "input": "your input here"
}),
});
const data = await res.json();
console.log(data.result);
MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
  "mcpServers": {
    "bead": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
    }
  }
}

# Then ask Claude to call:
mcp__bead__bead_sql_minifier

Full reference: developer docs · OpenAPI spec

What it strips

  • Line and block comments (-- …, /* … */)
  • Redundant whitespace — collapses runs to a single space
  • Spaces around punctuation that doesn't need them

What it keeps

String literals (single- and double-quoted), backtick identifiers, and $$…$$ dollar-quoted blocks are preserved verbatim so your queries still parse.

You might also like