Extract code from a screenshot, video, or PDF

Drop a screenshot, video frame, slide, or PDF that contains code — get clean source back with indentation preserved, language detected, and ready to paste straight into your editor. Skips the OCR mess of Tesseract on monospaced fonts and the manual cleanup that follows.

Drop a PDF or image here, or click to browse
Max 20 MB per file · PDF, PNG, JPG, WEBP, HEIC
Pro: drop up to 25 files at once for bulk extraction
What to extract from this code source?
or describe it yourself
Extracting clean code

Why this matters

Generic OCR mangles code. Spaces and tabs blur, brackets land on the wrong line, single-character tokens (i, l, 1, |) get confused. ExtractFox uses a multimodal model that reads source code semantically — it knows what a function declaration looks like, where indentation matters, and what to do with a string that contains escape characters.

How it works

  1. Step 1
    Upload the source

    A screenshot, slide image, video frame, conference talk PDF, or a copy-protected web page screenshot. Multiple files at once.

  2. Step 2
    Pick a mode

    Code only (clean), code with line numbers preserved, code with comments, or all code blocks from a multi-snippet image.

  3. Step 3
    Copy or download

    Plain text, .py / .ts / .go / .rs / etc. by detected language, or a Markdown file with fenced code blocks.

Sample output

Example: a screenshot of a Python function from a tutorial

languagepython
codedef fibonacci(n): if n <= 1: return n a, b = 0, 1 for _ in range(n - 1): a, b = b, a + b return b # Print the first 10 Fibonacci numbers for i in range(10): print(fibonacci(i))

Frequently asked questions

How do I extract code from a screenshot?+

Upload the screenshot here, pick a mode (clean code, with line numbers, all blocks, etc.), and click Extract. Output is ready to paste into your editor with indentation preserved.

Does it detect the language?+

Yes — every mode returns a detected language so you can save the file with the right extension. Recognized languages include Python, JavaScript, TypeScript, Go, Rust, Java, C++, Ruby, PHP, SQL, shell, and dozens more.

Can I extract code from a video tutorial?+

Take a screenshot of the frame with the code, then upload it. For longer tutorials with code that scrolls, screenshot each state and use the All code blocks mode to consolidate.

What about REPL or Jupyter notebook screenshots?+

Pick the Code and its output mode. Each input cell and its corresponding output come back separately so you can re-run the code without the output mixed in.

Will indentation be exact?+

Yes. Tabs vs spaces is preserved, indentation depth is preserved. Code that runs in the original screenshot will run when you paste the extraction.

How is this different from generic OCR like Tesseract?+

Tesseract treats code as text and routinely loses indentation, confuses similar characters (l/1/i, O/0), and breaks on monospaced fonts with thin strokes. The multimodal model reads code semantically — it knows what valid syntax looks like and produces output that compiles.

Related extractors

Compared to alternatives