#sql
2 APIs with this tag
Escape API
Escape a string so it is safe to drop into a specific context. Pick a target — a regular expression (so the text matches literally), a shell command (POSIX single-quote wrapping), a JSON string, a CSV field (RFC 4180 quoting) or a SQL string literal — and get back the correctly escaped value, plus a short note on the rule applied. The contexts endpoint lists every target with a worked example. Perfect for code generation, building commands and queries, templating and data export, and safely interpolating user input. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. The SQL context is a quoted literal for convenience, not a replacement for parameterised queries. Distinct from base64/hex/URL/HTML-entity encoders.
api.oanor.com/escape-api
SQL Formatter API
Format, beautify and minify SQL across 15+ dialects. Pass a query and get it pretty-printed with consistent indentation and keyword casing — for PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle (PL/SQL), BigQuery, Snowflake, Redshift, Spark, Trino, DuckDB, ClickHouse, DB2, Hive and standard SQL. Control the indent width and whether keywords are upper-cased, lower-cased or left as-is. A minify endpoint collapses a query to a single line (stripping comments while preserving string literals), and a dialects endpoint lists everything supported. Pure local processing — no key, no third-party service, instant. Live. 4 endpoints. Built for SQL editors and IDEs, query loggers, migration tooling, documentation and code review.
api.oanor.com/sqlformat-api