DevTools Logo

TODO Comment Extractor

TODO Comment Extractor

Scan source comments for TODO, FIXME, HACK and XXX tags with language-aware context and exports.

Runs in your browser
Try an example

Source code

Extracted tags

0 of 0 found

Paste source to extract TODOs

Language is detected from the filename extension.

TODO Comment Extractor scans source comments with a lightweight language-aware state machine. It knows line and block comment syntax for many common languages, skips string literals and markdown code fences, and reports TODO, FIXME, HACK and XXX tags with file, line, assignee, metadata such as @since, and the comment text. Results can be filtered, sorted and exported as Markdown, CSV or JSON.

Assigned TODO
// TODO(alice): add retry with backoff @since 2024-01-15

The row shows TODO, assignee alice, the comment text and parsed since metadata.

String suppression
const hint = "TODO: this string is not a comment";

Tags inside strings are ignored, so the table contains only genuine comment tags.

Block comments
/* FIXME: handle 429 responses
   HACK: temporary cache */

Multiple tags inside one block comment are extracted with their own line numbers.

Examples

Assigned tag

Input
// TODO(alice): add backoff @since 2024-01-15
Output
TODO · alice · add backoff · since=2024-01-15

Assignee and metadata are parsed out of the comment text.

String literal

Input
const s = "TODO: not real";
Output
no rows

Only comment spans are scanned; string contents never produce rows.

Custom marker

Input
// NOTE: check with design
Output
NOTE row when NOTE is configured

Custom tags extend rather than replace the default set.

About this tool

TODO Comment Extractor turns the scattered TODO, FIXME, HACK and XXX notes in a source file into a clean table. Language syntax is selected from the filename extension, and a single-pass scanner collects only real comment spans: strings, template literals and fenced code blocks are skipped.

Each row includes the file and line, tag, optional assignee from TODO(name), parsed metadata such as @since, and the comment text. Filter by tag, search the text, sort by file/line/tag/assignee, and export the visible rows as Markdown, CSV or JSON for a release note or handover document.

Custom tag sets are supported for team-specific markers like NOTE or REVIEW. The scanner is zero-dependency and runs entirely in the browser; source code is never uploaded.

What this tool does not do

  • The scanner uses a lightweight state machine, not a full language parser; unusual nested comment syntax may be missed.
  • Only one source file is scanned at a time; each paste replaces the previous file.
  • Markdown fence handling skips code blocks but does not parse prose comments beyond HTML comments.
  • Exports contain the visible filtered rows only.
  • Source text stays in the tab and is not persisted between visits.

How to use this tool

  1. Name the file

    Enter a filename with an extension so the right comment syntax is chosen (for example app.ts or script.py).

  2. Paste source

    Paste code into the source pane or load one of the sample chips. Tags inside strings are ignored.

  3. Narrow the list

    Filter by tag or search text, and sort by line, file, tag or assignee.

  4. Add custom tags

    Enter extra tags such as NOTE,REVIEW to scan alongside the four defaults.

  5. Export

    Choose Markdown, CSV or JSON in the export format control, then copy or download.

Use cases

Release notes

Collect outstanding TODOs into a Markdown table before shipping.

Handover

List FIXME and HACK markers with assignees for the next maintainer.

Code review prep

Find tags that should have been resolved before merge.

Audits

Scan snippets with custom markers such as SECURITY or REVIEW.

Extracted row fields

FieldMeaning
file / line / columnFilename and exact position of the tag in the source
tagTODO, FIXME, HACK, XXX or a configured custom tag
assigneeThe TODO(name) parenthesized owner, when present
textComment text after the tag with metadata tokens removed
metadataKey/value pairs parsed from @since, @date, @owner-style tokens
languageResolved scanner language name from the extension

CSV uses RFC 4180 quoting; Markdown escapes pipes; JSON preserves the full model.

Common mistakes

Mistake:Expecting matches inside strings or template literals.

Fix:The scanner deliberately skips string contents; a tag only counts inside a comment.

Mistake:Using the wrong filename extension.

Fix:Set the filename before pasting so hash-comment and block-comment languages are detected correctly.

Mistake:Thinking TODO(alice) is part of the message.

Fix:The parenthesized value becomes the assignee column, leaving the text clean.

Mistake:Wondering about @since after extraction.

Fix:It is stored as metadata and removed from the displayed text.

Mistake:Expecting a diff across versions.

Fix:The current tool scans one file at a time; keep two exports if you need to compare snapshots.

Frequently asked questions

Does it skip strings and markdown code fences?

Yes. The scanner tracks string literals, template literals and markdown code fences so a TODO inside a quoted value or fenced snippet never becomes a row. Only real line or block comment spans are searched for tags.

Which comment styles are supported?

Line and block comment syntax is configured for TypeScript, JavaScript, CSS, Python, Ruby, shell, Go, Rust, Java, C/C++, HTML, Vue, Markdown, SQL, YAML and JSON, with a sensible fallback for unknown extensions. The filename field selects the language.

Can I add custom tags?

Yes. Enter a comma-separated list such as NOTE,REVIEW in the Extra tags field. Custom tags extend the default TODO, FIXME, HACK and XXX set; they do not replace it.

Does it read assignees like TODO(alice)?

It does. The parenthesized name after a tag becomes the assignee column. Metadata tokens such as @since 2024-01-15 are parsed into a metadata field and removed from the visible comment text.

Is there a file count or size limit?

The tool scans one pasted file at a time. There is no fixed character cap, but extremely large pastes can slow the browser. Repeat the paste with a new filename to scan additional files; results are not persisted.

What can I export?

The visible rows can be switched to Markdown, RFC 4180-quoted CSV or JSON and then copied or downloaded. Markdown escapes pipes in text, and CSV doubles embedded quotes so spreadsheet import stays correct.

References & standards