HTML-BEAUTIFY(1)

πŸ“¦
version 1.15.4 Β· 3 versions
, in debian trixie, ubuntu resolute

πŸ’– HTML-BEAUTIFY πŸ’–

okay so bestie, say hi to html-beautify, aka the manual page for your new favorite glow-up tool. it lives in the User Commands section of the manual, and it's here to do exactly one thing and do it gorgeously ✨


🌸 NAME 🌸

html-beautify β€” beautify, unpack or deobfuscate HTML πŸ’…

like, it takes your crusty little HTML and makes it pretty. that's the whole vibe. no cap.


πŸŽ€ DESCRIPTION πŸŽ€

html-beautify.js@1.15.4

that's the version, bestie, and she's serving.

✨ CLI Options ✨

these are the knobs you turn at the command line, iykyk:

  • -f, --file β€” the input file(s). and if you wanna be ✨mysterious✨, pass '-' for stdin πŸ‘€
  • -r, --replace β€” write the output in-place, replacing the input. girl, it overwrites. be careful, fr fr.
  • -o, --outfile β€” write output to a file instead (default is stdout, so it just vibes into your terminal)
  • --config β€” path to the config file, if you're the organized type πŸ—‚οΈ
  • --type [js|css|html] ["js"] β€” pick your language flavor. default is "js".
  • -q, --quiet β€” suppress logging to stdout. shhh 🀫
  • -h, --help β€” show this help, bestie
  • -v, --version β€” show the version, in case you forgot we're on 1.15.4 πŸ’–

πŸ¦‹ Beautifier Options πŸ¦‹

now the FUN part. the actual makeover. all the defaults are listed, don't worry, i would never gatekeep πŸ’œ

  • -s, --indent-size β€” indentation size. default [4]. four spaces of pure elegance ✨
  • -c, --indent-char β€” the indentation character. default [" "]. yes, a single space. iconic.
  • -t, --indent-with-tabs β€” indent with tabs instead. this one overrides -s and -c, so pick a side and commit πŸ’€
  • -e, --eol β€” the character(s) used as line terminators. default is the first newline in the file, otherwise "\n
  • -n, --end-with-newline β€” end the output with a newline. tidy queen behavior πŸ‘‘
  • --indent-empty-lines β€” keep the indentation on empty lines. yes, even the blank ones get love.
  • --templating β€” a list of templating languages. the options are (auto,none,angular,django,erb,handlebars,php,smarty) and the default is ["auto", auto = none in JavaScript, auto = all except angular in html (and inline javascript/css)] β€” so auto means none in JavaScript, and in html (plus inline javascript/css) it means everything except angular. no cap, that's literally what it says.
  • --editorconfig β€” use EditorConfig to set up the options. let the config file do the talking 🫢
  • -b, --brace-style β€” brace style, one of [collapse|expand|end-expand], default ["collapse"]
  • -I, --indent-inner-html β€” indent the body and head sections. default is false.
  • -H, --indent-handlebars β€” indent handlebars. default is false.
  • -S, --indent-scripts β€” one of [keep|separate|normal], default ["normal"]
  • -w, --wrap-line-length β€” wrap lines that exceed N characters. default [0], so by default she does not wrap, she lets it flow 🌊
  • -A, --wrap-attributes β€” wrap html tag attributes onto new lines. pick from [auto|force|force-aligned|force-expand-multiline|aligned-multiple|preserve|preserve-aligned], default ["auto"]
  • -M, --wrap-attributes-min-attrs β€” minimum number of html tag attributes needed for the force wrap attribute options. default [2]
  • -i, --wrap-attributes-indent-size β€” indent wrapped tags to after N characters. default is [indent-level]
  • -p, --preserve-newlines β€” preserve line-breaks. and --no-preserve-newlines disables it, so you can flip the whole thing off ✌️
  • -m, --max-preserve-newlines β€” how many line-breaks get preserved in one chunk. default [10]
  • -U, --unformatted β€” a list of tags that should not be reformatted (it defaults to inline). leave them alone, they're doing their best πŸ™ˆ
  • -T, --content_unformatted β€” a list of tags whose content should not be reformatted (defaults to pre). the outside gets the glow-up, the inside stays untouched πŸ’…
  • -E, --extra_liners β€” a list of tags that should have an extra newline (defaults to [head,body,/html]). breathing room, bestie 🌬️
  • --unformatted_content_delimiter β€” keep text content together between this string. default [""]
⚠️ heads up: -r, --replace writes in-place over your input file, so if you're not 100% sure, maybe do a lil backup first. i'm just looking out for you πŸ₯Ί

🌈 a lil sign-off 🌈

that's the whole page, bestie β€” html-beautify, version 1.15.4, dated March 2025. you ate that πŸ’…βœ¨ go forth and make your HTML gorgeous. periodt. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from