Skip to main content
SQL Guide

SQL Formatter Without Uploading
Keep Your Schema Private

What popular SQL formatters do with your query, how to verify a tool is truly client-side, and what you're actually leaking when you paste SQL online.

6 min read·Updated May 2026

SQL formatter without uploading: the only safe way to format queries containing real table and column names is a tool that processes everything in your browser — because every SQL query you write is a partial blueprint of your database schema, and any tool that receives it on a server now has that blueprint too.

What Most SQL Formatters Do

The majority of popular SQL formatting tools work like this:

  1. You paste your query into a textarea
  2. You click "Format"
  3. A POST request fires to their API endpoint with your full query as the request body
  4. Their server parses and reformats the query
  5. The formatted result is returned and displayed

This is the path of least resistance for tool builders — it's easier to run a formatting library server-side than to bundle it into a browser page. But it means your query, with all its table and column names, is now on their server.

What Your SQL Query Reveals

SELECT
  u.email, u.plan_tier, u.stripe_customer_id,
  o.total_cents, o.status, o.created_at,
  p.name AS product_name
FROM users u
JOIN orders o ON u.id = o.user_id
JOIN products p ON o.product_id = p.id
WHERE o.status = 'pending'
  AND u.plan_tier = 'enterprise'

That query — which you might paste just to clean up indentation — tells an observer:

You have a users table with email, plan_tier and stripe_customer_id columns
You have orders and products tables with their exact column names
You store prices as integer cents (total_cents)
You use Stripe for billing (the column name gives it away)
You have an "enterprise" tier — implying a pricing model
Your foreign key naming convention is user_id, product_id

This is the schema intelligence that an attacker conducting reconnaissance would pay for. And you gave it away just to fix indentation.

Tool Comparison

Feature Most online formatters ResourceCentral SQL Local CLI tool
Query processed client-side
No query sent to server
Works offline
MySQL / PostgreSQL / T-SQL / SQLite varies varies
Keyword casing options varies varies
Indentation control varies varies
No install required
Verifiable via DevTools

How to Verify Any Tool Is Truly Client-Side

Before trusting any SQL formatter with a production query:

1
Open DevTools
Press F12 (or Cmd+Option+I on Mac). Go to the Network tab. Make sure "All" or "XHR/Fetch" is selected.
2
Clear the network log
Click the clear button (🚫) to remove any existing entries so you have a clean baseline.
3
Paste a test query and format it
Use a fake query with made-up table names: SELECT a, b FROM fake_table WHERE x = 1. Click the Format button.
4
Check for POST/XHR requests
If any network requests appear after you click Format, the tool is sending your query to a server. A truly client-side tool will show zero new requests.

Format SQL Without a Tool at All

For quick one-off formatting, you can use the sql-formatter package locally:

# Install once
npm install -g sql-formatter

# Format from stdin
echo "SELECT u.id,u.email FROM users u WHERE u.active=1" | sql-formatter --language postgresql

# Format a file
sql-formatter --language mysql < query.sql

Or in a Node.js script with no CLI install:

import { format } from 'sql-formatter';

const result = format(`SELECT u.id,u.email FROM users u WHERE u.active=1`, {
  language: 'postgresql',
  tabWidth: 2,
  keywordCase: 'upper',
});

console.log(result);

What to Do With Queries You've Already Pasted

If you've already used a server-side formatter with production queries, the information is likely in their logs. There's no way to undo this, but you can limit future exposure:

Format SQL in Your Browser — No Upload

MySQL, PostgreSQL, T-SQL, SQLite and Oracle. Keyword casing, indentation control. Verify in DevTools: zero POST requests.

Open SQL Formatter →

Related