Developer Tools • 5 min read

Developer Handbook: Formatting, Validating & Debugging JSON, SQL & RegEx

A practical developer guide to debugging raw JSON payloads, prettifying complex SQL statements, testing regular expressions, and decoding JWTs in-browser.

Published: 2026-10-20 • Last Updated: 2026-11-11 • By Mohammed Zawwar Hussain

Interactive Online Tools Referenced in this Guide

Taming Raw API Payloads with Client-Side JSON Formatting

Modern software development revolves around JSON REST APIs, webhook payloads, and configuration files. Reading unformatted or minified JSON from server logs is tedious and error-prone. The JSON Formatter & Validator runs 100% in your browser, parsing payloads instantly and highlighting syntax errors down to the exact line and character column.

Clean SQL Queries for Readability and Peer Review

Unformatted SQL queries with nested joins, subqueries, and window functions are difficult to inspect for performance bottlenecks. Using our SQL Formatter, you can standardise keyword casing (SELECT, FROM, WHERE, GROUP BY) and indentation so joins and subqueries are easy to follow in code review.

Safe JWT Inspection and Debugging

Be careful pasting production JSON Web Tokens into online services that send them to a server. ProIT's JWT Token Inspector decodes the Base64Url header and payload in your browser and shows the expiry (exp) as a readable date. Remember that anyone holding a JWT can read its payload: never put secrets in it.

Reading JSON validation errors

When JSON Formatter reports an error, the cause is usually one of these:
  • Trailing comma: {"a": 1,}. JSON does not allow a comma after the last item.
  • Single quotes: {'a': 1}. Keys and strings need double quotes.
  • Comments: // note is valid in JavaScript and JSONC, but not in JSON.
  • Unescaped characters: a raw line break or a lone backslash inside a string must be written as \n or \\.
Fix the first error reported and validate again; one missing quote can cause a chain of later errors.

What SQL Formatter does to your query

SQL Formatter puts each main clause on its own line and upper-cases keywords, which makes long queries reviewable. For example:
select id,name from users u left join orders o on o.user_id=u.id where o.total>100 order by name
becomes:
SELECT id,name
FROM users u
LEFT JOIN orders o ON o.user_id=u.id
WHERE o.total>100
ORDER BY name
It changes layout only. It does not check the query against your schema or run it, so a formatted query can still be wrong.

Regex patterns worth keeping

Regex Tester uses the browser's JavaScript engine, so results match your Node.js or front-end code. Some patterns developers reach for often:
^\d{4}-\d{2}-\d{2}$ → a date such as 2026-11-12
^[^\s@]+@[^\s@]+\.[^\s@]+$ → a rough email shape check
\b05\d{8}\b → a Saudi mobile number such as 0512345678
(?<year>\d{4}) → a named group you can read back as "year"
Use the g flag to find every match, i to ignore case and m to make ^ and $ match at each line. Treat the email pattern as a typo filter, not proof that an address exists.

Decoding vs verifying JWTs

JWT Decoder shows what a token claims, such as the user ID, roles and expiry, and whether exp has passed. It does not verify the signature, because that needs the server's key. Never trust a decoded payload on its own in your code; always verify the signature with your JWT library. To build test tokens with HS256, HS384 or HS512, use JWT Builder, which signs them in your browser.

Moving data between formats

Configuration and data often arrive in one format and are needed in another:
  • CSV to JSON: spreadsheet exports become arrays of objects with CSV to JSON Converter. Check that the first row really holds the column names.
  • YAML and JSON: Kubernetes manifests and CI files are YAML, while most APIs speak JSON. YAML ⇄ JSON Converter goes both ways; remember that YAML comments are lost in JSON.
  • TOML: used by Rust, Python packaging and many tools; TOML ⇄ JSON Converter helps when a script expects JSON.
After converting, run the result through the formatter or validator for the target format before committing it.

Timestamps in logs and tokens

Logs, databases and JWT claims often store time as a Unix timestamp: seconds since 1 January 1970 UTC. A 10-digit value such as 1762905600 is in seconds; a 13-digit value is in milliseconds. Paste either into Unix Timestamp Converter to see the date in UTC and your local time. Mixing seconds and milliseconds is one of the most common causes of dates that land in 1970 or far in the future. The timestamps and time zones guide covers the details.

Frequently Asked Questions

Does ProIT store any of the JSON, SQL, or tokens I format? ↓
The JSON Formatter, SQL Formatter, RegEx Tester and JWT Inspector run in your browser, so what you paste is not uploaded. Some other developer tools use our server for part of the work; each tool page shows where it runs, and nothing you submit is stored.
Why does my JSON fail with "Unexpected token"? ↓
Most often a trailing comma, single quotes or a comment. Check the line the formatter points to and the line just before it.
Will the regex behave the same in Python or PHP? ↓
Basic patterns will. Advanced features such as lookbehind, possessive quantifiers and some flags differ between engines, so test there too.
Is it safe to paste a production JWT? ↓
The decoder runs in your browser, but a live token is still a credential. Prefer expired or test tokens, and rotate any token you shared by mistake.
How do I tell seconds from milliseconds in a timestamp? ↓
Current dates are 10 digits in seconds and 13 digits in milliseconds. Divide a 13-digit value by 1,000 to get seconds.