Convert TIF to CSV
Convert TIFF pixels to CSV values or extract scanned tables with OCR.
Convert TIF files online
We don’t have a dedicated online converter for TIF to CSV yet, but you can convert TIF files online to these and more formats:
Want to convert TIF to CSV?
Let us know. We pick the conversions to add next by how many people ask for them.
How to convert tif to csv file
- Graphics
- No ratings yet.
A spreadsheet, statistical application, GIS workflow, or script may require image measurements as rows and columns instead of a TIFF image. A scanned table needs OCR and table extraction; a raster measurement needs a pixel-value export.
What the TIF format is
TIF, also written TIFF, is a tagged raster-image format that stores pixel samples, compression settings, color information, and optional metadata. Scanners, GIS and remote-sensing systems, desktop-publishing applications, digital microscopes, Adobe Photoshop, GIMP, and ImageJ commonly use it.
TIFF can contain grayscale, RGB, RGBA, palette-based, and high-bit-depth samples. A multipage TIFF stores several image pages, while GeoTIFF adds coordinate-system and georeferencing tags. TIFF is used for scans, print production, archiving, scientific imaging, and measurements where JPEG-style compression may be unsuitable.
What the CSV format is
CSV is a plain-text table whose fields are separated by commas or, depending on the application, semicolons or tabs. Spreadsheet programs, databases, statistical software, GIS tools, and programming languages can read it without a TIFF library.
For a raster export, one CSV row normally represents one image row and each field represents one pixel sample. A grayscale image produces one value per pixel; an RGB image can produce three consecutive values per pixel, in red, green, blue order. CSV is useful for numerical analysis, plotting, filtering, and importing measurements into Excel or LibreOffice Calc, but it is not an image format.
Convert pixel values with Python
Python with Pillow and NumPy gives the clearest control over sample values, channel order, pages, and output size. It is more suitable than a spreadsheet for large or high-bit-depth rasters.
- Install Python and the packages with
python -m pip install pillow numpy. - Save this as
tif_to_csv.py:
from pathlib import Path
import csv
import sys
import numpy as np
from PIL import Image
source = Path(sys.argv[1])
target = source.with_suffix(".csv")
with Image.open(source) as image:
if getattr(image, "n_frames", 1) != 1:
raise ValueError("This script expects a single-page TIFF")
pixels = np.asarray(image)
if pixels.ndim == 2:
rows = pixels
elif pixels.ndim == 3:
rows = pixels.reshape(pixels.shape[0], pixels.shape[1] * pixels.shape[2])
else:
raise ValueError("Unsupported TIFF pixel layout")
with target.open("w", newline="", encoding="utf-8") as file:
csv.writer(file).writerows(rows.tolist())
print(f"Wrote {target}")
- Run
python tif_to_csv.py input.tif. The script createsinput.csvwith one output row for each image row and no header.
For RGB or RGBA data, the output places the channel samples consecutively for every pixel: R, G, B, and optionally A. A palette-based TIFF may be exposed by Pillow as palette indices rather than displayed RGB values; convert it explicitly to RGB first if the palette colors, rather than the stored indices, are required. The script loads the complete raster into memory, so very large files should be processed in windows with a raster library or exported with R, MATLAB, or a database workflow.
For a multipage TIFF, iterate through image.seek(page_number) and write one CSV per page, or use a raster-processing tool that supports page selection. Fiji, the ImageJ distribution, is useful for inspecting a TIFF, converting its type through Image → Type, cropping, and measuring selected regions, but Python is more suitable for a repeatable full-image matrix export. ImageMagick's magick input.tif txt:- reports coordinates and pixel information; it requires parsing before it becomes a rectangular CSV.
Extract a scanned table with OCR
A scan containing text or a table does not contain usable spreadsheet cells. OCR must recognize characters and infer rows and columns, so exporting every pixel would not produce the requested data.
For a local workflow, Tesseract can produce positional OCR data with tesseract input.tif output tsv. TSV records include recognized words, confidence values, and bounding boxes; use Python or LibreOffice to group words into columns, correct errors, and save the result as CSV. ABBYY FineReader PDF is a stronger desktop option for table recognition and spreadsheet export. ABBYY FineReader PDF Online is an online alternative for non-confidential scans; export to XLSX when available, then open the workbook and save the required sheet as CSV.
Online services such as CloudConvert or Convertio may support some TIFF conversions, but a generic TIFF-to-CSV service cannot determine whether CSV should contain pixels, OCR text, or table cells. Use an online service only when its documented output matches that structure, and do not upload confidential scans. Check merged cells, ruled lines, skew, low contrast, and characters such as 0/O manually after OCR.
Quality and compatibility limits
- A pixel CSV is usually far larger than the compressed TIFF and discards TIFF compression, color profiles, tags, page structure, and GeoTIFF georeferencing unless those details are stored separately.
- Converting RGB to grayscale changes the data. Retain separate channels when color carries measurement information.
- TIFF samples may be calibrated measurements rather than display brightness. Scientific and remote-sensing exports should preserve sample type and separately record scale, offset, nodata, units, and geospatial metadata.
- CSV has no universal delimiter, data type system, channel convention, or metadata container. Document the encoding, delimiter, decimal separator, image width and height, channel order, nodata representation, and whether headers are present.
- Excel and similar spreadsheet applications impose row, column, and practical file-size limits. Large rasters should remain in a numerical or geospatial processing workflow instead of being opened directly in a spreadsheet.
TIF vs CSV: format comparison
How the TIF and CSV formats compare on the properties that matter most for this conversion.
| Property | .TIF Tagged Image File Format | .CSV Comma-Separated Values |
|---|---|---|
| Open standard | Yes | Yes |
| Compression | Both | Uncompressed |
| Typical file size | Large | Small |
| Opens in a web browser | No | Yes, natively |
| Further editing | Limited | Easy |
| Metadata support | Extensive | Basic |
| Plain-text readable | No | Yes |
| Best used for | Long-term archiving | Data exchange |
| Introduced | 1986 | — |
| Developer | Aldus Corporation, later Adobe Systems | — |
| MIME type | image/tiff | text/csv |
Information about file extensions and file types is provided by File-Extensions.org
Suggested software and links: tif to csv converters
Frequently asked questions
Can I convert a TIFF image to CSV?
Yes, but CSV cannot store the image itself. Depending on the conversion method, it may contain pixel values or text and table data recognized from the image.
Will a table in a TIFF keep its layout when converted to CSV?
Not necessarily. OCR may put recognized text into rows and columns, but the original fonts, spacing, colors, and other visual formatting are not preserved, and columns can be misplaced.
Why is text missing or incorrect in my TIFF to CSV conversion?
The conversion may rely on OCR, which can misread text in a low-resolution, skewed, blurry, or low-contrast scan. Clear, straight scans are more likely to produce accurate text.
What happens to a multipage TIFF when it is converted to CSV?
CSV has no built-in page structure, so the pages may be output separately, combined, or only partly processed, depending on the conversion method. Check how the method handles each page if the TIFF contains more than one.
Additional formats for
tif file conversion
- tif to tiff
- tif to svg
- tif to ecw
- tif to jpeg
- tif to jpg
- tif to ai
- tif to icon
- tif to pat
- tif to eps
- tif to jp2
- tif to 3fr
- tif to ani
- tif to avif
- tif to bmp
- tif to cdr
- tif to cgm
- tif to cr2
- tif to dcr
- tif to dib
- tif to djvu
- tif to dng
- tif to drw
- tif to emf
- tif to ept
- tif to fff
- tif to gem
- tif to gif
- tif to heic
- tif to ico
- tif to iff
- tif to jpx
- tif to mrw
- tif to nef
- tif to pdf
- tif to pef
- tif to png
- tif to ps
- tif to psd
- tif to rwl
- tif to svgz
- tif to tga
- tif to tns
- tif to webp
- tif to wmf