Format source code

Format JavaScript, TypeScript, HTML, CSS and Markdown.

Processed only in this browser
Input and settings
Processing options

Input and results are processed in this browser, without saving them to a server, URL or persistent browser storage. Clipboard content and downloaded files may remain on your device.

How to use this tool

  1. Enter code and choose its language.
  2. Set indentation, line width and quote preferences.
  3. Review the formatting and run the real project’s checks/tests too.

Format an object expression

Input and settings
const x={a:1};
Result
const x = { a: 1 };

JavaScript with two-space indentation and semicolons.

Processing rules and reading the result

Language parsers load on demand in a separate worker. Formatting organizes whitespace/style; it does not execute, type-check, lint or audit code for vulnerabilities.

Limits and checks before use

Up to 200,000 characters and 8 seconds; complex work is terminated. No project config files/plugins are read beyond selected options. Keep the original and compare against your real toolchain.

Common questions

How does this differ from the JSON formatter?

This formats source-language style. Use the dedicated JSON tool when original number tokens/duplicate keys must be retained.

Standards and references