Image Flip
Flip an image horizontally or vertically
GET
10 credits
/v1/image/flip
curl "https://image.toolkitapi.io/v1/image/flip?url=https://toolkitapi.io/static/samples/sample-image.png&direction=horizontal"
import httpx
resp = httpx.get(
"https://image.toolkitapi.io/v1/image/flip?url=https://toolkitapi.io/static/samples/sample-image.png&direction=horizontal",
)
print(resp.json())
const resp = await fetch("https://image.toolkitapi.io/v1/image/flip?url=https://toolkitapi.io/static/samples/sample-image.png&direction=horizontal", {
});
const data = await resp.json();
console.log(data);
# See curl example
Response
200 OK
{
"image": "/9j/4AAQSkZJRgABAQ...(base64 data)...",
"format": "png",
"direction": "horizontal"
}
Try It Live
Live Demo
Response
Description
Flip an image horizontally or vertically
How to Use
1
1. Provide the source image via the `url` query parameter.
2
2. Set `direction` to "horizontal" (left-right mirror) or "vertical" (top-bottom mirror).
3
3. Choose the output `format` and `quality`.
4
4. The flipped image is returned as base64.
About This Tool
Use the Image Flip endpoint to mirror an image along the horizontal or vertical axis. Horizontal flip creates a left-right mirror image, while vertical flip creates a top-bottom mirror.
This is useful for correcting selfie mirroring, creating symmetrical designs, and preparing images for specific layout requirements.
Why Use This Tool
- Selfie correction — Un-mirror selfie camera images
- Design symmetry — Create mirrored layouts and patterns
- Print preparation — Flip images for iron-on transfer printing
- Thumbnail consistency — Normalise image orientation across a gallery
Frequently Asked Questions
What is the difference between horizontal and vertical flip?
Horizontal flip mirrors the image left-to-right (like looking in a mirror). Vertical flip mirrors top-to-bottom (like flipping upside down).
Does flipping change the image dimensions?
No, the output has the same width and height as the input.
Can I flip and rotate in one call?
No, but you can chain the Flip and Rotate endpoints sequentially. Apply the flip first, then rotate the result.
Start using Image Flip now
Get your free API key and make your first request in under a minute.