CSS Specificity Calculator
Score a selector and find out which of two rules actually wins.
Turn a block of text into a comment in any language, wrapped and aligned.
The Text to Code Comment tool wraps text into a comment in thirteen styles without ever breaking a word, indents every line including the markers, and reverses the operation to lift a commented-out block back into live code.
Paste text and get it back as a properly formatted comment in thirteen styles, wrapped to a column, indented to match where it is going, and with a banner option for a section header. It works in reverse too, stripping the markers back off.
It sounds like a small thing, and it is — right up until you are pasting a licence header into forty files, or reformatting a paragraph of explanation that has drifted past column 120 and now wraps badly in everyone’s editor. The wrapping never breaks a word in half, the indentation is applied to every line including the markers, and the reverse direction is the quickest way to lift a commented-out block back into live code.
Every common line and block form, plus JSDoc, Python docstrings, Ruby =begin and Lua long comments.
Text is broken at spaces to the column you choose, with the marker width counted in.
A ruled box for a section header, optionally centred.
So the block drops into a nested scope already aligned.
Strips markers, leading asterisks and the indentation they came with, leaving the text.
A sentence, a paragraph or a whole licence header.
Thirteen, covering every common language plus JSDoc and Python docstrings.
Text is wrapped to the column without breaking a word.
Or switch direction to strip the markers off an existing comment.
Match whatever the file already uses — 80 and 100 are the usual choices, 120 in codebases with wide monitors in mind. A comment that wraps differently from the code around it is what people notice.
For a documentation comment above a function, where the tooling expects /** */, and for a long header. Line comments are easier to edit afterwards and never risk an unterminated block.
Because most scanners stop at the first */ they meet, so commenting out a region that already contains a block comment ends it early. Line comments have no such problem, which is why editors use them for "toggle comment".
Yes — switch direction and it removes line and block markers, the leading asterisks, and the indentation that came with them, leaving the text.
What people who use the Text to Code Comment think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Text to Code Comment. It takes half a minute and no account.
Write the first reviewScore a selector and find out which of two rules actually wins.
Render Markdown to clean HTML, with tables, task lists and fenced code.
Build layered box shadows visually, with a live preview.
Run XPath expressions against your own XML and see every node that matches.
Validate an IBAN's length, country and mod-97 checksum, and generate test ones.
Compare two semantic versions and test them against a range.
Serialise a JSON object into a percent-encoded URL query string.
Produce SHA-1, SHA-256, SHA-384 and SHA-512 digests of any text.