How to use
Paste code or choose a local file, confirm the language, set indent and print width, then press Format code. Copy or download the result without overwriting your source.
Code formatter
Choose a language, set indent and print width, and keep the source and formatted result separate. Formatting runs locally in a browser worker.
0 characters · 0 / 1,048,576UTF-8 bytes
Quick feedback
One tap is enough. You can ignore this and keep working.
Thanks — that helps us improve.
Paste code or choose a local file, confirm the language, set indent and print width, then press Format code. Copy or download the result without overwriting your source.
Formatting runs entirely in your browser through a dedicated worker. Source and result stay in page memory and are not added to URLs, storage, analytics, or remote processing requests.
Supported languages are JavaScript, TypeScript, JSX, TSX, CSS, SCSS, Less, HTML, Vue, Angular HTML templates, GraphQL, Markdown, MDX, and YAML. Source is limited to 1 MiB and is never executed, compiled, linted, or imported. Use theJSON Formatter orSQL Formatter for those jobs. Very large results may hide the on-page preview while Copy and Download remain available.
Keep checking
Validate, pretty-format, or minify strict JSON locally with useful parse errors, copy, and safe file download.
Open tool →Format SQL for Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server, BigQuery, and Snowflake locally without connecting or executing queries.
Open tool →Encode UTF-8 text to standard Base64 or Base64URL and strictly decode it back to text without sending source content away.
Open tool →Generate SHA-256, SHA-384, and SHA-512 fingerprints for local text or bounded local files using browser Web Crypto.
Open tool →Working notes
Formatting changes whitespace and layout, not program behavior. A parser may still reject invalid syntax, and some language features or very large documents can exceed the browser workspace. The formatter never runs the code, resolves imports, installs dependencies, or type-checks a project.
Source text is formatted in this tab. BeanNest does not receive, execute, or persist the code.
No. A formatter can lay out code that still contains syntax errors, and it may refuse input it cannot parse. Fix parse errors first, then format.
The formatter preserves program text according to the language parser, but it may wrap or reindent comments and sometimes changes quote style based on options. Review the diff before replacing a working file.