jpg to base64
jpg to base64 kept our JPEG's direction tag and internal dimensions; browser re-encoding removed the tag and stored the turned pixels, although both previews looked the same. Open the local image converter to encode your own JPG. Leave compression and resizing off when you want the original file bytes.
Direction tag or turned pixels: our JPEG comparison
Our direct output stored a 96 × 64 image with orientation tag 6, while the browser-re-encoded output stored a 64 × 96 image with no orientation tag detected.
We made an original four-colour JPEG with red and green above blue and yellow in its stored pixel grid, then wrote its EXIF orientation tag as 6. The original file measures 799 bytes. We sent this same file through two routes: encode and decode its complete bytes, or decode it as a browser image, draw the displayed image to a canvas and export JPEG at the configured quality value 0.92 before encoding and decoding. The canvas output measured 1015 bytes in our run.
The direct recovered file matched the original bytes. Its JPEG frame header still reported width 96 and height 64, and its EXIF orientation entry still contained 6. Its browser preview measured width 64 and height 96, with blue above yellow on the left and red above green on the right. The canvas output had that same visible arrangement, but its frame header now reported width 64 and height 96 and our EXIF parser found no orientation entry. The experiment distinguishes a direction instruction from the arrangement already stored in the pixels; it does not measure general image quality.
Not run on this device.
| Item | Direct file-byte encoding | Browser re-encoding |
|---|---|---|
| Internal width × height | 96 × 64 | 64 × 96 |
| Orientation tag | 6 retained | No entry detected |
| Decoded browser display | Portrait, 64 × 96 | Portrait, 64 × 96 |
| Recovered file bytes | 799 | 1015 |
Run the comparison to calculate the file headers and display dimensions on your device.
The table records our browser run on this original specimen. The button repeats the byte roundtrip, parses the JPEG frame header and EXIF orientation entry, and measures both loaded previews. Inspect the colour positions separately: matching dimensions alone do not prove matching direction. Browser exports may produce different file sizes. Download the original tagged JPG.
Does jpeg to base64 turn the picture?
In this specimen, direct encoding retained the direction entry rather than rewriting the pixel grid. The decoded preview applied that entry. A viewer's display and the file's internal width and height are separate observations.
How do I convert jpg to base64 without this re-encode?
Use the image converter with compression and resizing off. The experiment above uses only our bundled specimen and processes it in your browser. It accepts no visitor uploads and does not certify other viewers or JPEG files.