How to Extract Text from Images in Google Sheets (OCR) with =VISION (2026)

By Joe @ SimpleMetrics
Published 14 February, 2026

If you have screenshots, receipts, or scanned documents, the fastest way to get them into a spreadsheet is OCR. In 2026, you can do this directly in Google Sheets with the =VISION formula.

TL;DR

  • Put an image URL in a cell (public link or via Upload/Download Files).
  • Run: =VISION("Extract all readable text, keep line breaks.", A2)
  • If you need structured output, ask for JSON or CSV in the prompt.

Step 1: Get a working image URL

=VISION needs an image URL that Google Sheets can access. You have two reliable options:

  • Public image URL (a direct link to a JPG/PNG/WebP).
  • Upload/Download Files inside the add-on (recommended for private files). See Upload/Download Files.

If you’re using Google Drive links and the image fails to load, follow: Make Drive images accessible.

Step 2: Extract text with =VISION

Basic OCR prompt (best default):

=VISION("Extract all readable text. Keep line breaks.", A2)

If the image is a receipt or invoice, be explicit about what you want:

=VISION("Extract: merchant, date, total, currency, and line items. Return JSON.", A2)

Step 3: Turn OCR output into columns

OCR output is usually messy. The trick is to ask for a format that Sheets can parse. Two options that work well:

Option A: JSON (best for reliable field extraction)

=VISION("Extract fields and return strict JSON with keys: name, email, phone, company.", A2)

Then use your preferred JSON-to-columns approach (or ask the AI to output CSV directly if that’s simpler).

Option B: CSV (fastest to paste into a table)

=VISION("Return CSV with columns: date,total,currency. No extra text.", A2)

Troubleshooting

  • Result is empty or errors: the URL is not accessible. Re-check permissions or use Upload/Download Files.
  • Text is wrong or missing: try a higher-resolution image, crop to the relevant area, or add constraints: “Only read the top half”, “Ignore background”, “The text is small”.
  • Need repeatable workflows: keep prompts consistent and save outputs. See Save formula output.

Want more formulas?

If you’re doing OCR regularly, pair =VISION with other formulas like =PDF and =ANALYZE.

See Formula reference and Getting started.

Frequently Asked Questions

Can Google Sheets do OCR without scripts?

Yes. With an AI add-on you can run OCR-style extraction via =VISION using an image URL. This avoids Apps Script setup.

Why does my Google Drive image URL fail?

Drive sharing links often block direct image access. Use Make Drive images accessible or upload the file via Upload/Download Files.

How do I extract a receipt total accurately?

Ask for the exact fields you need and a strict format: “Return JSON with keys: date,total,currency,merchant”. If the image is low quality, crop to the totals section and rerun.

Ready to try it? Install AI for Sheets from the Google Workspace Marketplace and run your first OCR extraction in a few minutes.

Found this useful? Share it!

If this helped you, I'd appreciate you sharing it with colleagues.

Was this page helpful?

Your feedback helps improve this content.

Related Posts