Portal dev-tools.bluesky-labs.com
Secure Sandbox v1.0
Local Processing Verified: Your files and inputs never leave your device. Processed 100% client-side.

JSON & SQL Formatter

Decode JWT tokens, format complex JSON or SQL scripts, and generate cryptographically strong credentials safely in your browser thread. No data leaks.

Secure JWT Decoder JSON & SQL Formatter Credential Generator

Raw Input

Mode
Formated Code Output

Text Diff / Code Compare

Compare text, code, JSON, or Markdown locally.

Open new tool →

How to use the JSON & SQL Formatter

  1. Pick "JSON Formatter" or "SQL Formatter" in the Mode menu.
  2. Paste your code into the Raw Input box.
  3. Click "Format Output". The status line says "Valid JSON formatted successfully", "Invalid JSON" with the parser message, or "SQL query styled offline".
  4. Click "Copy formatted code" to take the result, or "Clear" to start again.

What it's useful for

  • Making a minified API response readable so you can find a nested field.
  • Locating the trailing comma or missing quote that breaks a JSON config file; the error message from the parser points to the problem.
  • Splitting a long one-line SQL query from a log into readable clauses before a code review.

Good to know

  • JSON mode uses the browser's strict JSON parser and re-prints the result with 4-space indentation. Comments, trailing commas and single-quoted strings are rejected, and if a key appears twice only the last value is kept.
  • Numbers larger than JavaScript can represent exactly (for example long 64-bit IDs) may be rounded when re-printed.
  • SQL mode is a simple keyword layout, not a parser. It collapses whitespace, starts a new line before keywords such as SELECT, FROM, WHERE, JOIN, AND, GROUP BY and ORDER BY, writes them in upper case and indents the clauses. It does not check syntax, and keywords inside quoted strings are split too.

FAQ

Why does my JSON with comments fail?

Comments are not part of the JSON standard. Remove them, or keep the file as JSONC and format it in an editor that understands that format.

Will the SQL formatter catch errors in my query?

No. It only rearranges lines and capitalises known keywords, so run the query in your database to validate it.