Convert a JPG to Base64
Encode a JPG to a Base64 string or data URI with copy-ready CSS and HTML snippets — free and right in your browser.
Déposez une image à encoder
Glisser-déposer, coller ou choisir un fichier
PNG · JPG · WebP · GIF · SVG — encodé sur votre appareil
Encoding JPG photos to Base64
JPG is the most common photo format, and turning one into Base64 is handy when you need a photo inline — in an HTML email, a single-file document, or an API payload — without hosting it separately. Encoding produces a data:image/jpeg;base64 URI you can paste straight into your markup or CSS.
The tool reads your JPG in the browser and shows the exact Base64 of the original file, so the photo isn't re-compressed and the decoded result is identical. You get the raw Base64, the data URI, and ready CSS and HTML snippets, each with copy and .txt download.
How to convert a JPG to Base64
- Open your JPG. Drag the JPG or JPEG onto the tool, choose a file, or paste it.
- Choose your output. Pick the raw Base64, the data:image/jpeg URI, a CSS rule, or an <img> tag.
- Copy or download. Tap Copy to use it right away, or download a .txt file.
Mind the size for photos
Photos are larger than icons, and Base64 adds about a third on top. For a big JPG, a normal hosted file usually loads faster and caches better — inline Base64 is best for small images or single-file use cases.
More Base64 & data URI tools
Questions fréquentes
Does encoding a JPG reduce its quality?
No. Base64 is a lossless text copy of the original JPG bytes — it doesn't re-encode the photo, so quality is unchanged.
Does it work with .jpeg as well as .jpg?
Yes. Both extensions are the same JPEG format and encode identically to a data:image/jpeg URI.
Why is the Base64 bigger than my JPG?
Base64 turns every 3 bytes into 4 text characters, adding roughly 33%. That overhead is normal for any Base64 encoding.
Where is my image processed?
The encoding and decoding happen in your browser, so the result is created on your own device. How any data associated with the tool is handled is described in our privacy policy.
Plus d'outils image
Crop an image
Crop to any ratio or an exact pixel size.
Image toolCompress an image
Shrink file size without visible quality loss.
Image toolResize an image
Change dimensions to exact pixels or presets.
Image toolConvert HEIC to JPG
Turn iPhone HEIC photos into universal JPG.
Image toolConvert image format
PNG, JPG and WebP — convert any to any.