OneFreePlace · Developer Tools · #343

SQL Formatter

Format complex SQL with dialect-aware token protection, shareable style profiles, safety auditing, and a semantic token guard — entirely in your browser.

100% freeLocal processingNo uploadSemantic guard
SQL input0 lines · 0 B
1
Formatted outputWaiting
1
•
Ready to formatInput never leaves this device.
Semantic guard—
Idempotency—
Statements—
Format time—
Input lines—
Output lines—
Tokens—
Comments—
Strings—
Placeholders—
Templates—
Warnings—

Safety & change lens

Formatting never runs SQL. The semantic guard compares significant token streams before enabling output.

Format SQL to see guard results, structural errors, and execution-review hints.
Drop SQL files hereor click to choose multiple .sql/.txt files. Formatting and ZIP creation stay local.

Portable style profile

Share formatting rules without sharing SQL. Profiles are plain JSON and can be imported into this tool.

What the profile controls

Layoutindentation, vertical lists, clause bodies and maximum line width
Casingkeywords, data types and optionally function names
Operatorslogical operator line placement and dense-operator mode
Portabilitydialect selection, line endings and semicolon placement
Safe by default: unquoted identifiers are never recased. Strings, quoted identifiers, comments, placeholders and template blocks are opaque tokens and remain byte-for-byte content-equivalent.

Dialect-aware protection

Choose Standard SQL, PostgreSQL, MySQL/MariaDB, SQL Server, Oracle, BigQuery, Snowflake, SQLite, DuckDB, Redshift, ClickHouse, Spark, Hive, Trino or DB2. Dialect selection controls quote/comment handling and review hints.

Semantic token guard

After formatting, OneFreePlace re-tokenizes the output and compares every significant token to the input. If token content changes unexpectedly, output is blocked instead of silently returned.

Idempotency check

The formatted result is immediately formatted a second time. Stable output is marked idempotent, making team diffs more predictable.

Templates & parameters

Jinja-style blocks, ${…}, positional parameters and named placeholders are protected as opaque tokens so formatting does not rewrite their contents.

Review hints

The audit flags destructive DDL and UPDATE/DELETE statements without a WHERE clause. These are review hints only—the tool never connects to or executes against a database.

Batch workflows

Format many SQL files with the same profile, verify each result, and download successful outputs plus a manifest in one local ZIP.

What it does not do

This is a formatter and lexical safety checker, not a database parser, optimizer or query runner. Stored-procedure delimiter semantics and application-specific templating can still require dialect-specific review.

Privacy

No account, upload or telemetry is required. Formatting, auditing, batch processing and ZIP creation happen in your browser.