Code Beautifier

Cleans up Python, JavaScript, HTML, CSS, JSON, YAML and similar code so it is readable. Turns messy code, packed JSON, or misaligned HTML into the standard format.

What it does

Use this to make someone else's badly formatted code readable, expand a tightly packed JSON response for inspection, indent an HTML template, or bring code in line with your team's style standard.

How to use

Single file format (Format mode)

  1. Pick a Language (Auto-Detect by default).
  2. Paste your code into the left panel.
  3. Click Format.
  4. The right panel shows the formatted code, use Copy to grab it.

Diff mode

Shows two versions of code side-by-side with the differences highlighted.

Batch mode

  1. Pick a folder.
  2. If Dry-run is off, tick the "I understand this overwrites files" confirmation.
  3. Click Run.

Every supported file under that folder is reformatted in place.

Supported languages

Python, JavaScript, TypeScript, HTML, CSS, JSON, YAML, XML, SQL, Markdown.

Modes

ModeWhat for
FormatQuick format of a single file/snippet.
DiffCompare two versions of code.
BatchReformat every file in a folder.
SettingsAdjust preferences (persisted).

Examples

Read a packed JSON response: Paste the API response, language JSON, hit Format. You get a nicely indented version.

Fix an HTML template: Paste the messy HTML, language HTML, Format. Every tag is indented properly.

Bulk-format a Python project: Batch mode, pick the folder, test with Dry-run first, then "I understand" + Run. All files end up in standard Python style.

Compare two versions: Diff mode, old code on the left, new code on the right, see the changes.

Watch out

  • In Batch mode, Dry-run is on by default, no files are written. To make real changes, tick the confirmation box.
  • Some language formatters need external tools (Prettier, Black) installed, otherwise a simple fallback is used.
  • Auto-detection looks at the extension and the content, it occasionally guesses wrong, manual is safer.
  • Very large files (10MB+) take a while.
  • Batch changes are not reversible, commit to git or back up first.

License

Free tier has a monthly format cap. Office and Ultimate plans remove it.