Pull every ``` code block out of Markdown or AI answers.
def greet(name):
return f"hello {name}"pytest -q
🧾 Works on any Markdown with triple-backtick fences — ChatGPT/Claude answers, README files, docs. The language chip filters (e.g. "py" matches python); indented 4-space code blocks are intentionally ignored.
Chat replies mix prose with runnable code. This extractor pulls every triple-backtick block, keeps the language tag, and drops everything else — ending the era of scroll-and-select on long answers.
Detected languages become filter chips (click "python" to see only Python). The filter matches substrings, so "py" finds python; type anything for custom matches.
Four-space indented blocks (old Markdown style) are intentionally skipped — they are rare in AI output and frequently false-positive regular paragraphs. If you need them, wrap the region in fences first.
The "Copy all" button concatenates every filtered block — handy for pasting a full solution into an editor or a gist in a single move.
More tools you might find useful
Form-built tool definitions → clean tools JSON for LLM APIs.
Fill {{variables}} in prompt templates from JSON — live preview.
Color-coded token boundaries with counts — see what models see.
Token count vs every model context limit, with headroom percentages.