Code Formatter
Beautify, format, and inspect code across JavaScript, TypeScript, JSON, HTML, CSS, SQL, and PHP.
Code Formatter, Beautifier & Lossless JSON Tree Guide
Format, indent, validate, and minify source code locally in your browser.
Overview
The Code Formatter beautifies and standardizes indentation for TypeScript, JavaScript, JSON, SQL, HTML, and CSS. It includes a lossless 64-bit JSON parser preserving precision for large BigInt numbers, a searchable tree viewer, and one-click minification.
How to Format and Inspect Code
Choose your target language (JavaScript, TypeScript, JSON, SQL, HTML, or CSS) and select 2-space, 4-space, or tab indentation.
Paste code directly into the editor or upload a local file from disk. The editor preserves line endings and character encoding.
Click "Format Code" to beautify. In JSON mode, switch to the Tree View to search paths or click "Minify" for compact storage.
{"id": 9223372036854775807, "active": true}{
"id": 9223372036854775807,
"active": true
}Standard JavaScript JSON.parse rounds 64-bit integers. Our lossless CST parser retains exact token representation without precision loss.
- Recommended maximum file size: 10 MB for responsive in-browser formatting.
- Supports JSON, JavaScript, TypeScript, SQL (MySQL/PostgreSQL), HTML5, and CSS/SCSS.
- Expiring shared links (optional) automatically expire after 7 days.
- Formatting is processed entirely in your browser using local parser engines.
- No source code is transmitted to remote servers unless you explicitly click "Share".
- Shared links store only encrypted code snippets with automatic 7-day TTL.