POST a native or scanned PDF and read structured JSON back: named fields, table rows and a confidence score on every value, from a single API call. Scans are run through OCR on the same endpoint, so one code path handles digital and scanned PDFs alike.
No layout-to-JSON mapping to write, no OCR engine to host. Drop a PDF in below and see the JSON your code would receive. Last updated July 2026.
Upload a document to extract
Drop files here or click to upload
Up to 50 files
Uploading...
See the JSON your PDF converts to, right in the browser.
To convert a PDF to JSON, send the file to a document extraction API and read the JSON it returns. The reason a PDF needs converting at all is that its layout locks the data to page positions rather than to a machine-readable structure, so software cannot query it. An API reads the page, recovers the values, and returns them as JSON: named fields, table rows with cells in order, and a confidence score on each value. If the PDF is a digital export it reads the embedded text; if it is a scan it runs OCR on the image first. Because the response is JSON, your code deserializes it straight into an object and writes it to a database, a queue, or an accounting workflow. For a single digital PDF you can instead parse text locally with an open-source library, but you then write the layout-to-JSON mapping yourself, and libraries cannot read a scan at all.
Three calls, from a PDF on disk to structured JSON. This is Python with the requests library; the same three calls work from any language. Swap in your API key from the dashboard.
import requests, time, json
API_KEY = "YOUR_API_KEY"
BASE = "https://docuocr.com/api/documents"
headers = {"Authorization": f"Bearer {API_KEY}"}
# 1. Upload the PDF (native or scanned), get a file_id
with open("invoice.pdf", "rb") as f:
up = requests.post(f"{BASE}/upload", headers=headers, files={"file": f})
file_id = up.json()["file_id"]
# 2. Start extraction, get a job hash
ex = requests.post(f"{BASE}/extract", headers=headers, json={"file_id": file_id})
job = ex.json()["extraction_hash"]
# 3. Poll until the JSON is ready
while True:
res = requests.get(f"{BASE}/extraction/{job}", headers=headers).json()
if res["status"] == "completed":
break
time.sleep(2)
# res["fields"] and res["tables"] are structured JSON, ready to store
print(json.dumps(res["fields"], indent=2))
That is the whole conversion. For a production batch, wrap each call in retry logic with exponential backoff on HTTP 429, and register a webhook instead of the polling loop so each result arrives as its document finishes. The document OCR API reference covers the full request and JSON response shape, and the Python OCR API guide expands this example.
What you get back differs far more than the price does. The real question is how much of the layout-to-JSON mapping the tool does for you, and whether it can read a scan. Verified July 2026.
| Tool | What the JSON contains | Reads scans (OCR) | Best for |
|---|---|---|---|
| DocuOCR API | Named fields, table rows and confidence as JSON | Yes, one endpoint | Structured JSON from real business PDFs, scans included |
| Google Document AI | Text plus entities as JSON, needs a processor | Yes | Google-native pipelines with a defined schema |
| AWS Textract | A Blocks array (geometry and relationships) | Yes | AWS teams that will assemble fields from blocks |
| Azure AI Document Intelligence | Layout and prebuilt-model fields as JSON | Yes | Azure stack, prebuilt invoice or receipt models |
| Google Cloud Vision | Text and bounding boxes, no named fields | Yes | Raw text off an image, mapping done by you |
| Mistral Document AI | Markdown plus structured JSON output | Yes | LLM parsing of mixed narrative and data |
| pdfplumber / PyMuPDF (open source) | Text and positions, you build the JSON | No (digital PDFs only) | A one-off digital PDF with a clean text layer |
The honest split: an open-source library is the right call for a single digital PDF with a clean text layer, and the cloud SDKs fit teams already standardized on that cloud. But a scan is an image that libraries cannot read, and raw OCR APIs return text you still have to map into fields. DocuOCR returns named fields, tables and confidence already structured, so the mapping code disappears. See the OCR API pricing comparison for per-1,000-page rates, and PDF table extraction if you only need the tables.
Generate a key in the dashboard and send it as a Bearer token on every request.
POST a native or scanned PDF as multipart form data and read the file_id from the JSON.
POST the file_id to start an async job. Scans are OCR-ed here; digital PDFs are read directly.
Poll or receive a webhook, then deserialize fields, table rows and confidence into your model.
Turn PDF invoices into JSON line items and post them to an ERP, QuickBooks or NetSuite with no manual entry.
Convert PDFs to JSON at the ingest stage so every downstream service receives typed, queryable records.
Structure PDFs into clean JSON before indexing, so retrieval and LLM answers work from fields, not raw dumps.
Read scanned statements and reports into JSON table rows, then load them into a warehouse for analytics.
Extract IDs and forms to JSON, check confidence scores, and route low-confidence values to a reviewer.
Feed the JSON straight into APIs and databases so document data flows between apps without a human retyping it.
The full endpoint reference and JSON response shape.
Extract text and data from any image with one API.
Pull tables from PDFs to Excel, CSV or JSON.
Extract any field from PDFs, not just tables.
The same three calls from Python with requests.
The same three calls from Node.js with fetch.
Call the API from .NET with HttpClient.
An honest roundup of OCR APIs for US teams.
Per-1,000-page rates across the market.
Generate an API key, paste the three calls above, and read structured JSON back in minutes. No OCR engine to host, no mapping code to maintain, and a free tier to test the output on your own PDFs before you pay per page.