What does the TIFF to JPG Converter do?
The TIFF to JPG Converter converts Tagged Image File Format (.tiff / .tif) graphics and desktop document scans into lightweight, web-compatible Joint Photographic Experts Group (.jpg / .jpeg) photos with customizable background colors, quality presets, and Retina resolution scaling.
TIFF is a flexible bitmap format widely used in desktop publishing, professional photography, digital medical imaging, and flatbed document scanning. However, web browsers (Chrome, Edge, Firefox) cannot display TIFF files natively, and their enormous file sizes make them impractical for web delivery and online sharing. Converting TIFF to JPG decreases file size by up to 90% while providing universal browser and mobile compatibility.
Core Concepts
- Multi-Byte Order Parsing: Supports both Little-Endian (
IIIntel) and Big-Endian (MMMotorola) TIFF byte orders. - IFD Metadata Extraction: Extracts intrinsic image dimensions (
ImageWidth,ImageLength), compression algorithms (LZW, PackBits, Deflate, Uncompressed), and Photometric Interpretation. - Customizable Solid Background Replacement: Transparent or uncompressed baseline pixels are blended onto your chosen solid background color (White, Black, Off-White, Dark Navy) to avoid dark halos in JPEG outputs.
- Variable JPEG Quality Compression: Adjust compression between 60% and 100% to balance storage size and visual clarity.
How to use the tool?
- Upload TIFF File or Paste Base64: Drag and drop a
.tiff/.tiffile into the drop zone, or paste a Base64 TIFF Data URI string into the editor. - Select Background Fill & Quality: Choose your background fill color (
#ffffff,#000000) and JPEG quality preset (92%,100%,80%). - Optional Dimension Overrides: Set custom pixel
WidthorHeightoverrides if resizing is needed. - Convert to JPG: Click Convert to JPG to execute rasterization.
- Download or Copy: Click Download to save your
.jpgfile or Copy the Base64 Data URI.
Related Developer Utilities
- TIFF to PNG Converter — Convert TIFF scans to lossless PNG format.
- PNG to JPG Converter — Convert PNG images into compressed JPEG photos.
- WebP to JPG Converter — Convert WebP graphics to JPEG photos.
- BMP to PNG Converter — Convert uncompressed Windows BMP images to PNG.
REST API Integration
blueutils.com provides a free REST API endpoint (POST https://blueutils.com/api/image/tiff-to-jpg) for programmatic validation, TIFF IFD tag parsing, and JPEG Data URI formatting.
API Request Parameters
| Name | Type | Description | Example |
|---|---|---|---|
rawText |
String | Base64 TIFF Data URI or raw Base64 payload. | "data:image/tiff;base64,SUkqAA..." |
options.scale |
Number | Multiplier scale factor (1, 2, 3, 4). Default is 1. |
2 |
options.quality |
Number | JPEG quality factor from 0.1 to 1.0. Default is 0.92. |
0.92 |
options.background |
String | Hex or CSS background fill color. Default is "#ffffff". |
"#ffffff" |
options.width |
Number | Optional target width in pixels. | 1200 |
options.height |
Number | Optional target height in pixels. | 800 |
API Request Payload Examples
cURL
curl -X POST https://blueutils.com/api/image/tiff-to-jpg \
-H "Content-Type: application/json" \
-d '{
"rawText": "data:image/tiff;base64,SUkqAAgAAAASAP4ABAABAAAAAAAAAAABBAABAAAAAQAAAAEBBAABAAAAAQAAADIBAgAUAAAAngAAADUBAgALAAAAsgAAADYBAgALAAAAugAAADkBAgAMAAAAwgAAAAAAAAABAAAAAQAAAAEAAAAKAAAASAAAAGAAAAABAAAAAQAAAAEAAAAAAAEAAQABAAAA",
"options": {
"scale": 1,
"quality": 0.92,
"background": "#ffffff"
}
}'Python
import requests
url = "https://blueutils.com/api/image/tiff-to-jpg"
payload = {
"rawText": "data:image/tiff;base64,SUkqAAgAAAASAP4ABAABAAAAAAAAAAABBAABAAAAAQAAAAEBBAABAAAAAQAAADIBAgAUAAAAngAAADUBAgALAAAAsgAAADYBAgALAAAAugAAADkBAgAMAAAAwgAAAAAAAAABAAAAAQAAAAEAAAAKAAAASAAAAGAAAAABAAAAAQAAAAEAAAAAAAEAAQABAAAA",
"options": {
"scale": 1,
"quality": 0.92,
"background": "#ffffff"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String jsonPayload = """
{
"rawText": "data:image/tiff;base64,SUkqAAgAAAASAP4ABAABAAAAAAAAAAABBAABAAAAAQAAAAEBBAABAAAAAQAAADIBAgAUAAAAngAAADUBAgALAAAAsgAAADYBAgALAAAAugAAADkBAgAMAAAAwgAAAAAAAAABAAAAAQAAAAEAAAAKAAAASAAAAGAAAAABAAAAAQAAAAEAAAAAAAEAAQABAAAA",
"options": {
"scale": 1,
"quality": 0.92,
"background": "#ffffff"
}
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://blueutils.com/api/image/tiff-to-jpg"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}API Response Parameters
| Name | Type | Description | Example |
|---|---|---|---|
isValid |
Boolean | Indicates whether the TIFF was parsed successfully. | true |
mimeType |
String | Target output MIME type (image/jpeg). |
"image/jpeg" |
originalFormat |
String | Detected input MIME type (image/tiff). |
"image/tiff" |
dataUri |
String | Base64 JPEG Data URI string. | "data:image/jpeg;base64,..." |
metadata.originalWidth |
Number | Original width in pixels extracted from IFD tag 0x0100. | 800 |
metadata.originalHeight |
Number | Original height in pixels extracted from IFD tag 0x0101. | 600 |
metadata.targetWidth |
Number | Scaled target pixel width. | 800 |
metadata.targetHeight |
Number | Scaled target pixel height. | 600 |
metadata.byteOrder |
String | TIFF byte order endianness (Little-Endian (II) / Big-Endian (MM)). |
"Little-Endian (II)" |
metadata.compression |
String | Detected TIFF compression algorithm description. | "Uncompressed" |
metadata.photometric |
String | Photometric interpretation model. | "RGB" |
snippets.html |
String | Ready-to-use HTML <img> tag. |
"<img src=\"...\" />" |
snippets.css |
String | Ready-to-use CSS background-image declaration. |
"background-image: url(\"...\");" |
API Response Payload Examples
Success Response (HTTP 200 OK)
{
"isValid": true,
"mimeType": "image/jpeg",
"originalFormat": "image/tiff",
"dataUri": "data:image/jpeg;base64,SUkqAAgA...",
"base64": "SUkqAAgA...",
"metadata": {
"originalWidth": 800,
"originalHeight": 600,
"targetWidth": 800,
"targetHeight": 600,
"scale": 1,
"quality": 0.92,
"background": "#ffffff",
"byteOrder": "Little-Endian (II)",
"compression": "Uncompressed",
"photometric": "RGB",
"aspectRatio": 1.3333,
"originalSizeBytes": 146,
"formattedSize": "146 B"
},
"snippets": {
"html": "<img src=\"data:image/jpeg;base64,...\" width=\"800\" height=\"600\" alt=\"Converted JPEG Graphic\" />",
"css": "background-image: url(\"data:image/jpeg;base64,...\");",
"markdown": ""
}
}Validation Failure Response (HTTP 400 Bad Request)
{
"isValid": false,
"error": "Invalid format: Expected a valid Tagged Image File Format (.tiff / .tif) file."
}Rate Limit Exceeded Response (HTTP 429 Too Many Requests)
{
"error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}Why use an API to convert TIFF to JPG?
Automating TIFF to JPG conversion via API in build workflows and document ingestion pipelines offers major benefits:
- Web Document Ingestion: Transform scanned multi-page or single-page TIFF documents into lightweight web images automatically.
- Storage Cost Optimization: Reduce archival storage costs by compressing heavy archival TIFF scans into high-quality JPEG photos.
- Optimized Token Efficiency for AI Agents: Extracts clean image dimensions and IFD compression metadata before sending image data to multimodal vision agents.
Native Usage
How to convert TIFF to JPG locally using command-line tools:
Windows (CMD / PowerShell)
# PowerShell: Convert TIFF to JPG with white background using ImageMagick
magick -background white -flatten "scan.tiff" -quality 92 "scan.jpg"Linux / Unix (Bash / Shell)
# Bash: Convert TIFF to JPG using ImageMagick
convert -background white -flatten scan.tiff -quality 92 scan.jpg
# Or using tiff2rgba / libtiff utilities:
tiff2rgba scan.tiff scan_rgba.tif && convert scan_rgba.tif scan.jpgPython
# Python using Pillow
from PIL import Image
# Open TIFF and convert to RGB with background fill
tiff_image = Image.open('scan.tiff')
if tiff_image.mode in ('RGBA', 'LA') or (tiff_image.mode == 'P' and 'transparency' in tiff_image.info):
alpha = tiff_image.convert('RGBA')
bg = Image.new('RGB', alpha.size, (255, 255, 255))
bg.paste(alpha, mask=alpha.split()[3])
bg.save('scan.jpg', 'JPEG', quality=92)
else:
tiff_image.convert('RGB').save('scan.jpg', 'JPEG', quality=92)
print("Converted scan.tiff to scan.jpg successfully")Java
// Java native ImageIO conversion
import java.io.File;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.awt.Color;
import java.awt.Graphics2D;
public class TiffToJpg {
public static void main(String[] args) throws Exception {
BufferedImage tiffImage = ImageIO.read(new File("scan.tiff"));
BufferedImage jpgImage = new BufferedImage(tiffImage.getWidth(), tiffImage.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g = jpgImage.createGraphics();
g.setColor(Color.WHITE);
g.fillRect(0, 0, tiffImage.getWidth(), tiffImage.getHeight());
g.drawImage(tiffImage, 0, 0, null);
g.dispose();
ImageIO.write(jpgImage, "jpg", new File("scan.jpg"));
System.out.println("Converted scan.tiff to scan.jpg successfully");
}
}