JPG to Excel API

Extract Tabular Data from Images into Editable Excel Spreadsheets.

hero banner

Code Examples in Popular Languages

Integrate our JPG to Excel API easily into your apps with comprehensive code examples in popular languages to get started quickly.

CURL Request
curl --location 'https://theonlineconverter.com/api/v1/image-converter' \
--header 'Content-Type: application/json' \
--header 'x-api-key: enter_your_api_key' \
--form 'from="jpg"' \
--form 'to="excel"' \
--form 'file=@"/D:/data/Images/png/image.png"'
JavaScript Fetch
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "enter_your_api_key");

const formdata = new FormData();
formdata.append("from", "jpg");
formdata.append("to", "excel");
formdata.append("file", fileInput.files[0], "/D:/data/Images/png/image.png");

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: formdata,
  redirect: "follow"
};

fetch("https://theonlineconverter.com/api/v1/image-converter", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
Ruby Net::HTTP
import requests
import json

url = "https://theonlineconverter.com/api/v1/image-converter"

payload = {'from': 'jpg',
'to': 'excel'}
files=[
  ('file',('image.png',open('/D:/data/Images/png/image.png','rb'),'image/png'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
Python Requests
import requests
import json

url = "https://theonlineconverter.com/api/v1/image-converter"

payload = {'from': 'jpg',
'to': 'excel'}
files=[
  ('file',('image.png',open('/D:/data/Images/png/image.png','rb'),'image/png'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
PHP Guzzle
<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'x-api-key' => 'enter_your_api_key'
];
$options = [
  'multipart' => [
    [
      'name' => 'from',
      'contents' => 'jpg'
    ],
    [
      'name' => 'to',
      'contents' => 'excel'
    ],
    [
      'name' => 'file',
      'contents' => Utils::tryFopen('/D:/data/Images/png/image.png', 'r'),
      'filename' => '/D:/data/Images/png/image.png',
      'headers'  => [
        'Content-Type' => '<Content-type header>'
      ]
    ]
]];
$request = new Request('POST', 'https://theonlineconverter.com/api/v1/image-converter', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
Java HttpURLConnection
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("from","jpg")
  .addFormDataPart("to","excel")
  .addFormDataPart("file","/D:/data/Images/png/image.png",
    RequestBody.create(MediaType.parse("application/octet-stream"),
    new File("/D:/data/Images/png/image.png")))
  .build();
Request request = new Request.Builder()
  .url("https://theonlineconverter.com/api/v1/image-converter")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("x-api-key", "enter_your_api_key")
  .build();
Response response = client.newCall(request).execute();
Go net/http
package main

import (
  "fmt"
  "bytes"
  "mime/multipart"
  "os"
  "path/filepath"
  "net/http"
  "io"
)

func main() {

  url := "https://theonlineconverter.com/api/v1/image-converter"
  method := "POST"

  payload := &bytes.Buffer{}
  writer := multipart.NewWriter(payload)
  _ = writer.WriteField("from", "jpg")
  _ = writer.WriteField("to", "excel")
  file, errFile3 := os.Open("/D:/data/Images/png/image.png")
  defer file.Close()
  part3,
         errFile3 := writer.CreateFormFile("file",filepath.Base("/D:/data/Images/png/image.png"))
  _, errFile3 = io.Copy(part3, file)
  if errFile3 != nil {
    fmt.Println(errFile3)
    return
  }
  err := writer.Close()
  if err != nil {
    fmt.Println(err)
    return
  }


  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("x-api-key", "enter_your_api_key")

  req.Header.Set("Content-Type", writer.FormDataContentType())
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
C# HttpClient
var options = new RestClientOptions("https://theonlineconverter.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/image-converter", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-api-key", "enter_your_api_key");
request.AlwaysMultipartFormData = true;
request.AddParameter("from", "jpg");
request.AddParameter("to", "excel");
request.AddFile("file", "/D:/data/Images/png/image.png");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);

Key Features & Capabilities

Our API is powered by an intelligent OCR engine to deliver precise and structured data extraction from images.

Simple User Interface

AI-Powered Table Recognition

Our advanced OCR engine doesn't just read text; it understands the structure of tables, accurately identifying rows, columns, and cells to ensure proper data placement.

Simple Data Format

High-Accuracy Data Extraction

Minimize manual data entry errors. The API accurately converts numbers, text, and symbols from your images directly into the correct cells in an Excel spreadsheet.

Time

Structured Excel Output

Receive a perfectly formatted, ready-to-use XLSX file. The extracted data is organized into rows and columns, mirroring the table in the original image.

Secure Data

Handles Various Image Sources

Effectively extract data from high-resolution scans, smartphone photos of documents, and screenshots, with built-in image pre-processing to improve results.

Universal Access

Multi-Language Support

Our OCR engine recognizes text in numerous languages, making it a versatile solution for processing international invoices, reports, and documents.

Freedom

Secure & Confidential

All images are processed over encrypted connections. We guarantee confidentiality with a strict data privacy policy and do not store your files.

Frequently Asked Questions

Find answers to common questions about our JPG to Excel API to understand its capabilities and how to achieve the best results.

The API uses Optical Character Recognition (OCR) technology specifically trained to detect table structures. It first identifies the table's boundaries, rows, and columns in the image. Then, it recognizes the text and numbers within each cell and populates a new Excel (XLSX) file with this structured data.

Accuracy is very high but depends on the quality of the source image. For best results, use clear, well-lit images with standard printed fonts and clear table borders. Our pre-processing helps correct for minor rotation or skew.

Our engine is designed to handle common table structures, including those with headers. For highly complex tables with many merged cells, the output will be a best-effort interpretation and may require a quick review.

While the API is named for the most common format, it also supports other standard image files like PNG, BMP, and TIFF.

This API is highly optimized for printed text. While it may recognize very clear, block-style handwritten numbers, it is not designed for cursive or inconsistent handwriting. For that, please see our Handwriting to Text API.

The API response will contain a secure, time-limited download link to the generated XLSX file.

Absolutely. We use end-to-end TLS encryption for all data transfers. Your files are processed in memory and are permanently deleted from our servers immediately after the conversion is complete.