Contact

Tools  /  Generators  /  Code Comment Generator

Code Comment Generator

Paste a function signature (JS / TS / Python / Java / PHP / Go) and get a documentation comment — JSDoc, TSDoc, Google / NumPy / reST docstrings, Javadoc, PHPDoc or Doxygen — with parameters, types, returns and throws laid out for you.

What this tool does

It parses a function signature — name, parameters with their types and default values, and the return type — and renders a documentation comment in whichever convention your codebase uses.

Signatures it understands

JavaScript and TypeScript (function, arrow functions, methods, with or without type annotations), Python (def name(a: int = 1) -> str:), Java (public String greet(String name)), PHP (function greet(string $name): string) and Go (func Greet(name string) error). It also accepts a bare name(a, b).

Output styles

JSDoc and TSDoc for JS/TS; Google, NumPy and reStructuredText docstrings for Python; Javadoc for Java; PHPDoc for PHP; and Doxygen for C-family code. Types from the signature are carried into the comment where the style supports them.

Options

Toggle description placeholders, a @throws / Raises block, an @example block, tag alignment, and the comment width. Everything updates as you type.

Privacy

Parsing and rendering are entirely local. Nothing is uploaded.

Frequently asked questions

Does it run or import my code?
No. It only reads the text of the signature you paste, entirely in your browser.
Which languages can I paste from?
JavaScript, TypeScript, Python, Java, PHP and Go signatures are recognised, plus a bare name(arg1, arg2) form.
Will it keep my parameter types?
Yes, when the signature has them (TS annotations, Python hints, Java/PHP/Go types) and the chosen style has a place for them.
Can it generate NumPy-style docstrings?
Yes — Google, NumPy and reStructuredText (Sphinx) docstring styles are all available for Python.
Is anything sent to a server?
No. The tool is fully client-side.
Theme Accent