Skip to content
andcode Tools

Code Beautifier & Formatter

🔒 Runs in your browser

Minify is available for CSS and JSON only.

Four languages, one workspace

Paste or drop a file and pick the language — JavaScript, CSS, HTML or JSON. Beautify re-indents the source across clean lines and normalises spacing, so a one-liner scraped from a bundle, a config blob or a minified stylesheet becomes readable again. JS, CSS and HTML are handled by the open-source js-beautify library; JSON is re-serialised through the native parser for a canonical, key-preserving pretty-print, with a clear message pointing at the problem when the input is not valid JSON.

Beautify and safe minify

Minify is offered only where it can be done safely without a full tokenizer: JSON collapses to its most compact form, and CSS is shrunk with a string-aware pass that drops comments and redundant whitespace while leaving quoted content and significant spacing — like inside calc() — untouched. JavaScript and HTML are intentionally left out of minify, because hand-shrinking them without a parser risks silently breaking the code.

One caveat for JSON: numbers are re-serialised through the browser's native JSON engine, which stores them as 64-bit floats. Integers larger than 2^53 (some database or "snowflake" IDs) and very long decimals can therefore lose their last digits — keep such values as strings if exact digits matter.

Everything runs in your browser

Formatting happens entirely on your device — nothing you paste is uploaded or logged — so running a snippet straight from a production database, an API response or a private repo carries no more exposure than opening it in a local editor.

Frequently asked questions

Which languages can it format?

JavaScript, CSS, HTML and JSON. Beautify works for all four; Minify is offered for CSS and JSON, where it can be done safely.

Does my code leave the browser?

No. Formatting runs entirely on your device — nothing you paste is uploaded, stored or logged.

Is the CSS and JSON minify safe?

Yes. JSON is re-serialised through the native parser, and CSS is shrunk with a string-aware pass that keeps quoted text and calc() spacing intact.

Why can I not minify JavaScript or HTML?

Shrinking them safely needs a full parser; a naive whitespace pass can silently break the code, so those offer Beautify only.

What happens with invalid JSON?

You get a clear error message pointing at the problem instead of broken output, so you can fix the input.

Related tools

Clear local data?

This permanently erases everything this site has saved in this browser:

  • Saved audio projects (Audio Mixer autosave)
  • Project boards, cards and attachments (Kanban)
  • Your favorite tools
  • Preferences, such as your language choice

This can't be undone, and it only affects this browser on this device.