Turn Your Old iPhone Into a Free Local OCR Server
TL;DR: iOS-OCR-Server turns any iPhone into a REST API for OCR using Apple’s Vision Framework. Send an image, get back extracted text as JSON. No cloud, no API costs, unlimited usage. Perfect for repurposing that old iPhone in your drawer.
That iPhone 11 collecting dust in your drawer? It’s a better OCR server than most cloud APIs — and it’s completely free to run.
What Is iOS-OCR-Server?
iOS-OCR-Server is an open-source app that exposes Apple’s Vision Framework as a REST API. Your iPhone becomes a network-accessible OCR endpoint that any device can call.
The setup is simple:
- Install the app from the App Store (search “OCR Server”)
- Launch it — note the IP address shown
- Send images to
http://<ip>:8000/upload - Get JSON back with extracted text and bounding boxes
No account creation. No API keys. No cloud dependencies.
Why Use Your iPhone for OCR?
Apple’s Vision Framework is genuinely excellent:
| OCR Engine | Accuracy | Speed | Cost | Privacy |
|---|---|---|---|---|
| Apple Vision | ✅ Excellent | Fast | Free | ✅ Local |
| Google Cloud Vision | ✅ Excellent | Fast | $1.50/1K | ❌ Cloud |
| AWS Textract | ✅ Excellent | Medium | $1.50/1K | ❌ Cloud |
| Tesseract | ⚠️ Medium | Slow | Free | ✅ Local |
Vision Framework particularly excels at:
- Mixed language documents (English + CJK)
- Handwritten text
- Receipts and structured documents
- Low-quality images and photos
And unlike Tesseract, you don’t need to install dependencies or tune configurations.
How Do I Set It Up?
Option 1: App Store (Easiest)
Search “OCR Server” on the App Store and install. Launch, note the IP, done.
Option 2: Build from Source
git clone https://github.com/riddleling/iOS-OCR-Server.git
cd iOS-OCR-Server
open iOS-OCR-Server.xcodeproj
# Build and run on your device
Calling the API
# Basic OCR request
curl -X POST http://192.168.1.100:8000/upload \
-H "Accept: application/json" \
-F "[email protected]"
Response:
{
"success": true,
"image_width": 1200,
"image_height": 800,
"ocr_boxes": [
{
"x": 50,
"y": 100,
"w": 400,
"h": 30,
"text": "Invoice #12345"
},
{
"x": 50,
"y": 150,
"w": 300,
"h": 25,
"text": "Date: March 17, 2026"
}
]
}
Python Client Example
import requests
def ocr_image(image_path, server_ip="192.168.1.100"):
url = f"http://{server_ip}:8000/upload"
with open(image_path, "rb") as f:
response = requests.post(
url,
files={"file": f},
headers={"Accept": "application/json"},
timeout=60
)
data = response.json()
if data.get("success"):
# Extract just the text
return "\n".join(box["text"] for box in data["ocr_boxes"])
return None
text = ocr_image("receipt.jpg")
print(text)
What Are the Limitations?
Screen must stay on: The iPhone needs to remain awake while running the server. Use Guided Access or disable auto-lock.
Network-bound: Only accessible on your local network (unless you set up port forwarding or a tunnel).
Single-threaded: The app handles one request at a time. Fine for personal use, not for high-throughput production.
Device performance varies: Newer iPhones (12+) process images quickly. Older devices like iPhone SE 2 are noticeably slower.
When Should I Use This vs Alternatives?
Use iOS-OCR-Server when:
- You have a spare iPhone
- Privacy matters (documents never leave your network)
- You want zero ongoing costs
- You’re integrating with home automation / self-hosted apps
Use cloud OCR when:
- You need 24/7 reliability
- Processing thousands of documents
- iPhone availability is inconsistent
Use Tesseract when:
- You need to run on a server (no iPhone)
- You’re comfortable with configuration tuning
- Accuracy requirements are moderate
Integrating with Paperless-ngx
Paperless-ngx users can point their OCR backend to iOS-OCR-Server:
# docker-compose.yml snippet
environment:
PAPERLESS_OCR_URL: "http://192.168.1.100:8000/upload"
Your documents get processed locally on your iPhone instead of being sent to a cloud service.
Frequently Asked Questions
What is iOS-OCR-Server?
iOS-OCR-Server turns any iPhone into a local OCR server. It exposes Apple’s Vision Framework as a REST API, letting any device on your network extract text from images by sending HTTP requests.
How accurate is iPhone OCR?
Apple’s Vision Framework is one of the most accurate OCR engines available, rivaling Google and AWS. It’s particularly strong with mixed languages, handwriting, and low-quality images.
Does it work with any iPhone?
Any iPhone running iOS 15+ works. Performance scales with device capability — iPhone 12 and newer are significantly faster than older models.
Is there a macOS version?
Not directly, but you can use Vision Framework on macOS through different tools. The iPhone version’s appeal is repurposing old devices you already own.
Can I process PDFs?
The server accepts images. For PDFs, convert pages to images first (using ImageMagick, pdftoppm, etc.) then send each page to the OCR endpoint.
How do I keep the iPhone awake?
Enable Guided Access (Settings → Accessibility → Guided Access) or set Auto-Lock to “Never” while using the app. Plug in the charger for extended use.
Links: