Monu Tools

SQL 포맷터

SQL 쿼리를 절 단위 줄바꿈과 일관된 키워드 대소문자로 형식화하거나 한 줄로 압축합니다.

SQL 포맷터 사용 방법

  1. 01

    SQL 쿼리를 입력 상자에 붙여넣으세요.

  2. 02

    형식화를 선택하여 보기 좋게 만들거나 압축을 선택하여 한 줄로 압축하세요.

  3. 03

    키워드 대소문자를 선택하고 결과를 복사하세요.

What the SQL formatter does

This is a SQL formatter that takes a cramped, single-line or inconsistently styled query and beautifies it: each major clause on its own line, columns and conditions indented, and keyword casing made consistent. It can also do the reverse and minify a query to one line.

Why readable SQL helps

Readable SQL is easier to review, debug and maintain. When SELECT, FROM, WHERE, JOIN and GROUP BY each start a new line and the keywords share one casing, the shape of the query, what it returns and how it filters, becomes obvious at a glance.

Formatting is also useful right before committing a query so diffs stay small and reviewers see meaningful changes rather than reflowed whitespace.

Options and dialects

You choose the keyword casing (for example uppercase keywords, which is the common convention) and whether to format or minify. The formatter is dialect-agnostic and handles the common ANSI SQL used by PostgreSQL, MySQL, SQLite and SQL Server.

Minify mode is handy for the opposite need: collapsing a formatted query back to a single line to embed in code or a config value.

It formats, it does not validate

The tool formats for readability rather than checking that your query is valid, so it will happily lay out a query with a typo in it. Treat clean output as a readability win, not a correctness check.

Runs in your browser

Everything runs in your browser, which matters because real queries often contain table names, column names and sometimes literal values that hint at your schema or data. None of that is uploaded.

자주 묻는 질문

포맷터는 무엇을 하나요?

SELECT, FROM, WHERE, JOIN 같은 주요 절을 각각 별도의 줄에 배치하고, 열과 조건을 들여쓰며, 가독성을 위해 키워드 대소문자를 정규화합니다.

SQL이 서버로 전송되나요?

아니요. 형식화는 브라우저에서 완전히 실행되므로 쿼리가 기기 밖으로 나가지 않습니다. 테이블이나 열 이름이 포함된 쿼리에도 안전합니다.

어떤 SQL 방언을 지원하나요?

방언에 구애받지 않으며 PostgreSQL, MySQL, SQLite, SQL Server에서 사용되는 일반 ANSI SQL을 처리합니다. 구문을 검증하기보다 가독성을 위해 형식화합니다.

이 도구 임베드하기

이 도구를 직접 운영하는 웹사이트에 추가하세요. 아래 코드를 복사하면 자동으로 최신 상태로 유지됩니다.

<iframe src="https://monu.tools/embed/ko/sql-formatter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

관련 도구