Tools · Developer Tools
Code Formatter & Beautifier
Format JavaScript, TypeScript, HTML, CSS, SCSS, Markdown, GraphQL, JSON, XML, and YAML in this browser. Code is not executed.
HTML preview
Scripts are disabled. The markup is shown in a sandboxed frame and is not injected into this page.
Formatting runs in this browser with a local indent engine. JavaScript, C#, Java, and HTML are never executed. JSON, XML, and YAML reuse the dedicated tools. GraphQL is indented only; this is not schema validation. C# and Java are omitted because this page does not ship a compiler. API: None.
How to format code
- Choose a listed language. Only implemented formatters appear.
- Paste or upload source, then format. Minify is available where the language supports it.
- HTML preview opens a sandboxed iframe with scripts disabled. Download a sanitized filename such as devnestro-formatted.js.
FAQ
Is my source uploaded or sent to Prettier?
No. Formatting runs in this browser. There is no external formatter API and no paid API.
Does the JavaScript formatter execute my code?
No. It tokenizes and indents. It does not eval, run a VM, or inject script tags into the page.
Which languages are implemented?
JavaScript, TypeScript, HTML, CSS, SCSS (indent only, not Sass compilation), Markdown, GraphQL (format only), JSON, XML, and YAML. C# and Java are not listed.
Is GraphQL schema validation included?
No. Queries are indented. The tool does not load a schema and does not claim validation.
How is HTML preview sandboxed?
Preview uses an iframe with sandbox and no scripts. Markup is not assigned with innerHTML on this page.
Do language URLs share this page?
Yes. /tools/javascript-formatter, typescript-formatter, html-formatter, css-formatter, xml-formatter, yaml-formatter, and graphql-formatter open this formatter with that language selected.
Read the original guide: Beautify JavaScript and HTML without running them.