
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
beautify-html
Advanced tools
A simple customisable NPM package 📦 to instantly beautify boring HTML documents 🎨
A simple customisable NPM package 📦 to instantly beautify boring HTML documents 🎨
Using npm:
npm i beautify-html
Import the package with ES6 modules:
import beautify from "beautify-html";
Include the js file in the HTML document:
<script type="module" src="yourfile.js"></script>
To apply the styling, call the beautify function with the type of theme you want and primary color.
Syntax
beautify(theme, color, [, optIn?: boolean])
Examples
import beautify from "beautify-html";
// light theme with blue primary color
beautify("light", "blue");
// dark theme with purple primary color
beautify("dark", "purple");
Before

After

Themes:
Colors:
You can opt in into styling the document per element, similary of how you would use bootstrap for example.
Attributes included are:
Examples
import beautify from "beautify-html";
// setting the opt in parameter to true will enable
// stying only to selected elements
beautify("light", "blue", true);
<body>
<h1 class="beautify-title">Lorem Ipsum</h1>
...
<form method="get">
...
<input class="beautify-input" type="text" />
...
<input class="beautify-button" type="submit" />
...
</form>
...
</body>
MIT
FAQs
A simple customisable NPM package 📦 to instantly beautify boring HTML documents 🎨
We found that beautify-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.