JSON Formatter
Pretty-print messy or minified JSON with 2-space indents.
Beautify a one-line SQL query in your browser: major clauses go on their own lines, keywords are capitalised and columns are split out. It tidies by keyword and does not parse the SQL.
Your browser is preparing the tool. It runs 100% locally.
Paste a cramped or one-line SQL statement and the tool lays it out: each major clause (SELECT, FROM, WHERE, JOIN, ORDER BY and so on) starts a new line, those keywords are capitalised, and each comma-separated column goes on its own indented line. It is a lightweight keyword tidier and does not parse the SQL, so it helps readability but knows nothing about dialects, subqueries or strings. Your browser does the formatting and uploads nothing.
This tool takes a SQL query that has been written or generated on a single line and reformats it into the conventional, readable shape: clauses stacked vertically, keywords in capitals, and a column list broken out one per line.
Use it to make a long query legible, for example to review a statement copied from a log, an ORM or a query builder without pasting it into a database client.
The tool first collapses all runs of whitespace to single spaces. It then looks for a fixed list of SQL keywords (SELECT, FROM, WHERE, the JOIN family, GROUP BY, ORDER BY, HAVING, LIMIT and the main write statements) and starts a new line before each one, capitalising it as it goes. Finally, it puts each comma on its own line and indents the item that follows.
This is keyword matching, not parsing. The tool does not understand the query's structure, tables or expressions; it only recognises those words and the comma. That keeps it small and free of dependencies. Simple queries come out readable, while complex ones need a proper formatter.
1 · collapse all whitespace to single spaces
2 · start a new line before each listed keyword, capitalised (SELECT, FROM, WHERE, JOIN family, GROUP BY, ORDER BY, HAVING, LIMIT, …)
3 · put each comma on its own line, indented two spacesBefore: select id,name,email from users where active=1 order by name
After:
SELECT id, name, email
FROM users
WHERE active=1
ORDER BY nameOnly the keywords in the list are capitalised and broken onto new lines; other text is left as you wrote it. Every comma is split, including commas inside a function call or a VALUES list.
Your query never leaves your device. Your browser reformats it without a network request, so nothing is uploaded.
Because the work is local, you can safely tidy queries that mention real table names or internal schema without the site storing or sending them anywhere.
Nothing carries over between visits. Close the tab and the input and output are gone.
It reads simple queries cleanly, but it is a keyword tidier, not a parser. It does not understand the query, so it cannot validate it, align subqueries, or know which dialect you are using. It only reacts to a fixed set of words and the comma.
The keyword list is short. Common words such as UNION, AS, LIKE, BETWEEN, IN, and CASE or WHEN are not in it, so they are neither capitalised nor broken onto a new line. Complex queries keep parts of their original layout.
Every comma is split onto a new line, including commas inside a function call, a VALUES list or a CAST. That can over-split a query, putting function arguments on separate lines where you would rather keep them together.
It matches keywords as whole words wherever they appear, so a keyword inside a string literal, such as the word order within quotes, can be wrongly capitalised and broken. A parser would know it was inside a string and leave it alone.
Lay out a one-line statement from a log or an ORM.
Stack the clauses to scan a statement quickly.
Format a query for a pull request or a message.
Present SQL clearly in documentation.
For complex, dialect-aware formatting that handles subqueries, strings and CTEs, use a parser-based tool (such as sqlformat or a SQL plugin in your editor or database client). This tool is for a fast in-browser tidy of a simple query.
Breaks lines before a fixed list of SQL keywords and after commas, and uppercases those keywords. It is a pattern tidier, not a parser, so it knows nothing about dialects or subqueries.
Pretty-print messy or minified JSON with 2-space indents.
Paste JSON and find out whether it parses.
Standard Base64 for any text, emoji included.
MD5, SHA-1 and the SHA-2 hashes of any text, as you type.
Up to 500 random version 4 UUIDs at once.
Strips comments and whitespace to put a stylesheet on one line.
Paste, run and copy. The code stays in your browser and you don't need an account.