Tools,

Business card scanner to Excel, free and tested

144 of 147

values right from simulated phone photos

Get card2csv.py

One command, one row a card

card2csv.py reads each card photo or scan and writes one CSV row a card. It runs on your computer, free.

card2csv.py

pip install opencv-python-headless numpy rapidocr onnxruntime
brew install tesseract
python3 card2csv.py --rapid cards/*.jpg > cards.csv

Columns: file, name, title, company, phone, phone2, email, website and address. Open cards.csv in Excel or Google Sheets.

Leave out --rapid and Tesseract reads the cards. That was 3 to 4 times faster here, but 16 values worse on photos.

How does the script sort the lines?
  1. Emails, web addresses and phone numbers by pattern. Two numbers on one line split at a label like Tel or M.
  2. A line with a street number, a US ZIP or a UK postcode is the address.
  3. Company: the first line that spells the email or web domain, or that has Inc, LLC, Studio and the like.
  4. Name: the line that matches the email name, like maria.lopez or mlopez. Else the first line of 2 or 3 capitalized words.
  5. Title: the first line left with a job word, like Owner, Manager or Agent.

RapidOCR scored highest on our test photos

24 made-up cards, 147 values in each set, in the right CSV column
Way Scans Photos
Tesseract, photo as it is 139 74
Card cropped flat, then Tesseract (card2csv.py) 139 128
RapidOCR (card2csv.py --rapid) 145 144
Apple Vision, Mac only 144 142
Our Actor's text 113 99

Every way went through the same rules, so only the reading and the crop differed.

Apple Vision took 0.27 s a card, timed as one batch on our Mac. It needs a Mac and a small Swift program, so the script uses RapidOCR.

Crop the card out of the photo

74 of 147 values, Tesseract on the photos as they were

128 of 147 after card2csv.py cut each card out and made it flat

A test card rendered as a phone photo at an angle on a desk, and the same card cropped flat. From the photo Tesseract read the email as elanaka@tig. From the flat card it read the whole email right.
Test card 7. The crop took the email from wrong to right.

RapidOCR did not need the crop. It read the photos as they were.

What still went wrong

Need all the text? Our Actor

Our Apify Actor reads a card image and returns Markdown text, not columns. On scans its text held 137 of 147 values.

Fewer landed in the right column, because it joins short card lines into longer ones, like the company and the name.

An image costs $0.006, and each run has a $0.00005 start fee at the default 1 GB of memory.

curl -s -X POST "https://api.apify.com/v2/acts/brasspage~pdf-ocr-to-markdown/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documentUrls": ["https://example.com/card.jpg"]}' \
  | jq -r '.[].markdown'

Try the Actor

How I tested it
  • Cards: 24 made-up cards in 5 layouts and 12 Mac fonts, drawn at 600 dpi. Names, firms and addresses are made up.
  • Phone numbers use the ranges kept for fiction, and every domain ends in .example.
  • Each card as a simulated flatbed scan and a simulated 12 MP phone photo on a desk, turned up to 8 degrees. Renders, not real photos.
  • 147 values in each set, in 7 fields: name, title, company, phone, email, website and address.
  • Right means the CSV cell equals the value. Emails and web addresses ignore case, addresses ignore commas and periods, and phones compare digits.
  • The rules were tuned on 12 other cards, then frozen. One fix came after the test run, for two numbers on one line. Before it, photos gave 142 with RapidOCR.
  • Tesseract 5.5.4 with --psm 11 (the default mode got 131 on scans), RapidOCR 3.10.0, OpenCV 5.0.0, Apple Vision on macOS 26.6, the Actor's code at build 0.1.97.
  • Times on our Mac at low priority: 2.0 to 2.8 s a card with Tesseract on one thread, 8.0 to 8.7 s with RapidOCR on its default threads.
  • From the command line the script gave the same rows as the test: all 48 images without --rapid, and 4 with it. LibreOffice Calc opened the CSV with Renée intact.
  • Not tested: Excel itself, real cards, handwriting, the back of a card, non-Latin scripts.

Questions people ask

Can I scan business cards into Excel for free?

Yes. card2csv.py reads photos or scans offline and writes one CSV row a card. With RapidOCR it put 144 of 147 values in the right column on our simulated phone photos.

Do I need a scanner, or is a phone photo enough?

A phone photo was enough for RapidOCR: 144 of 147 values on our simulated photos, against 145 on scans. Tesseract needs the card cut out and made flat first, and card2csv.py does that.

Which free OCR reads business cards best?

RapidOCR scored highest on our simulated card photos (144 of 147). Apple Vision was close and faster, but it runs only on a Mac. Tesseract trailed, even with the crop.