Skip to content

Turn curved page photos into flat, readable scans

Drop in a photo of a book, newspaper, or document: get back a flattened, straightened page in seconds.

✓ 5 free credits, no card needed ✓ Results in 2–4 seconds
Photo
A photo of a curved book page, warped near the spine
→
Flattened
The same page after page-dewarp straightens it into a flat, readable scan
Prefer the API? See the curl example ▾
# Upload a photo, get a flat page back
curl -s https://page-dewarp-api.louismmx.workers.dev/api/dewarp \
  -H "Authorization: Bearer pdw_your_key" \
  -F "file=@book-page.jpg" \
  --output dewarped.png

# That's it. One image in, one image out.

Full API docs →

Your camera captures it fine. The scan doesn't.

Most scanning apps assume the page is flat. Yours isn't.

A curved photo can look fine on your phone.
But it's not what you want when you need to print it, OCR it, or archive it.

page-dewarp fits a cubic curve to the actual curvature of the page and maps it back to a flat plane giving you sharper text, less distortion at the margins, and a better page for text OCR.

📐

Physically modelled

Fits a cubic Hermite spline to the shape of the page, modelling how the paper surface actually bends, not just a perspective guess.

⚡

JAX-accelerated

Runs page-dewarp with JAX autodiff, ~11× faster than the SciPy fallback. Typical processing: 2–4 seconds per image.

💳

Pay per image

No subscriptions. Buy credit packs from £2 and use them whenever. If processing fails, you're not charged. See pricing →

🔧

Every knob exposed

All page-dewarp parameters can be tuned, from page margins to line detection settings.

📦

Structured metadata

Every response includes the fitted rotation, translation, cubic coefficients, and page corners as JSON for QA or batch analysis.

🔓

Open source core

The library behind this API is MIT-licensed and on GitHub — this service is for people who want dewarping without managing Python, NumPy, SciPy, OpenCV, and JAX.

Frequently Asked Questions

Do I need to install anything?▾

No. The app runs entirely in your browser: upload a photo, download the flattened result. The API is there if you want to integrate it into your own tooling.

What does it cost?▾

You get 5 free credits with no card required. After that, credit packs start from £2 and are used per successful image: if processing fails, you keep the credit.

What image formats are supported?▾

JPG, PNG, and TIFF in; PNG, JPG, or TIFF out. See the quickstart for the full parameter list.

How is this different from a perspective-correction tool?▾

Most scanning apps assume the page is flat and just fix the camera angle. page-dewarp fits a physical model of how the paper actually curves, so text near the spine and margins comes out sharp instead of stretched.

Can I process images in bulk?▾

The hosted app and API are built for one-off and light integration use. For high-volume batches, the open-source library runs locally and is up to 33× faster for multi-image workloads.

Ready to flatten your first page?

Five free credits, no card needed. See the result before you pay for anything.

Processing high volumes? The open-source library runs locally with native batch mode — up to 33× faster for multi-image workloads. The API is for lighter use and integration.