js-beautify

Reformats and re-indents JavaScript, HTML, and CSS into clean, readable code

Tool
npm
v2.0.3
8,987stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
89/100Excellent
Development Activity96
Maintenance72
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture78
Code Quality72
Innovation70
Learning Curve82

js-beautify is a long-running, widely used code formatter that takes minified, obfuscated, or inconsistently indented JavaScript, HTML, or CSS and reformats it into readable, consistently indented source. It ships as a Node.js library with a CLI (js-beautify, css-beautify, html-beautify), a browser-embeddable script, and a companion Python package (jsbeautifier), and it also partially deobfuscates scripts packed by common packers.

It has been maintained since 2008 and is the formatting engine behind the popular beautifier.io web tool, embedded in countless editor extensions and dev tool integrations that need to pretty-print arbitrary JS/HTML/CSS on the fly.

What You Get

  • A js-beautify CLI plus dedicated css-beautify and html-beautify executables for formatting files or piped stdin
  • A Node.js library API (beautify.js, beautify.css, beautify.html) for programmatic formatting inside build tools or editors
  • A browser-ready bundle (via cdnjs) exposing js_beautify, css_beautify, and html_beautify globals
  • A parallel Python implementation (jsbeautifier/cssbeautifier) with matching CLI and library interfaces
  • Partial deobfuscation of scripts packed by Dean Edwards’ packer and related tools
  • Extensive configuration via .jsbeautifyrc/EditorConfig for indent size, brace style, wrap length, and templating languages

Common Use Cases

  • Reformatting minified or obfuscated third-party JavaScript for readability during debugging
  • Powering an editor extension or IDE’s built-in “format document” command
  • Normalizing code style in a build pipeline before further static analysis
  • Embedding a formatter in a browser-based code playground or snippet tool

Under The Hood

Architecture - The codebase splits into three parallel beautifiers (js/src/javascript, js/src/css, js/src/html) that share a common tokenizing core in js/src/core (tokenizer.js, token.js, inputscanner.js, pattern.js, output.js). Each language beautifier tokenizes input into a stream, walks it applying indentation/brace-style rules from options.js, and re-emits formatted output via the shared output.js writer; a mirrored Python implementation under python/jsbeautifier and python/cssbeautifier reimplements the same core/tokenizer pattern for the pip-installable CLI. Tech Stack - Plain JavaScript (no framework), packaged for Node via js/index.js with CLI entrypoints under js/bin/, plus webpack-based bundling (webpack.config.js) for the browser distribution; the Python port depends only on the standard library. Runtime dependencies are minimal (config-chain, editorconfig, glob, js-cookie, nopt). Code Quality - Tests live under js/test/ (node, AMD, and browser “sanity” suites) and python/*/tests, covering each beautifier against fixture data in test/data/{javascript,css,html}; the project has run for over a decade with 3,300+ commits and 275 contributors, though the README itself flags that it is under-resourced for its popularity and actively seeking maintainers. API Design - The library API is a thin, well-documented beautify(code, options) signature mirrored across JS, Python, and CLI surfaces with underscore-cased option names matching CLI flag names one-to-one, which keeps the developer experience consistent across all four distribution channels (Node, browser, Python, CLI).

Used by 11 apps in this directory

TypeScript
59%
Other

agenta

Developer Tools · Devops · AI Development

4,489

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript59%
Python39%
Updated today
JavaScript
44%
Other

LimeSurvey

Forms Surveys

3,698

The world's most flexible open-source survey platform with 900+ templates, conditional logic, 80+ languages, and full GDPR compliance for any scale.

View details
86
Repo Health
62
Technical
62
Dependency
Built with
JavaScript44%
PHP34%
CSS12%
Updated today
Go
41%
AGPL 3.0

listmonk

Marketing · Blogging

22,989

High-performance, self-hosted newsletter and mailing list manager packaged as a single binary with built-in analytics, transactional messaging, and multi-channel delivery.

View details
90
Repo Health
74
Technical
68
Dependency
Built with
Go41%
Vue24%
JavaScript19%
Updated yesterday
TypeScript
86%
MIT

medusa

Ecommerce

35,900

The most flexible open-source commerce platform — build B2C, B2B, and marketplace applications with modular, composable commerce primitives.

View details
94
Repo Health
87
Technical
65
Dependency
Built with
TypeScript86%
JavaScript14%
Updated today
TypeScript
27%
AGPL 3.0

Omnivore

Knowledge Management · Bookmarks Archiving · Note Taking

16,221

Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.

View details
78
Repo Health
74
Technical
66
Dependency
Built with
TypeScript27%
JavaScript24%
HTML19%
Updated 2 days ago
TypeScript
38%
AGPL 3.0

OpenObserve

Monitoring · Analytics · Devops

21,267

Open source observability platform for logs, metrics, traces, and real user monitoring — delivering 140x lower storage costs than Elasticsearch with a single binary you can run in under 2 minutes.

View details
89
Repo Health
9
Technical
73
Dependency
Built with
TypeScript38%
Rust28%
Vue18%
Updated today
Clojure
72%
MPL 2.0

Penpot

Design Tools

58,871

Open-source design platform with GPU-accelerated canvas, native design tokens, and MCP-powered AI workflows for teams that ship fast.

View details
91
Repo Health
83
Technical
75
Dependency
Built with
Clojure72%
Updated today
TypeScript
92%
AGPL 3.0

RSSHub

Automation · Social Media

45,802

Turn any website into an RSS feed — social media, streaming platforms, and niche sites all become subscribable in seconds.

View details
83
Repo Health
82
Technical
74
Dependency
Built with
TypeScript92%
Updated yesterday
Python
58%
Other

Sentry

Security · Developer Tools · Monitoring

44,574

Developer-first error tracking and performance monitoring platform with AI-powered root-cause analysis across 20+ languages and frameworks.

View details
95
Repo Health
80
Technical
70
Dependency
Built with
Python58%
TypeScript41%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search