JPG to Base64

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.

エンコードする画像をドロップ

ドラッグ&ドロップ、貼り付け、またはファイルを選択

PNG · JPG · WebP · GIF · SVG — お使いのデバイスでエンコード

JPG & JPEGCopy or .txtNo sign-up PNG · JPG · WebP · GIF · SVG

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

  1. Open your JPG. Drag the JPG or JPEG onto the tool, choose a file, or paste it.
  2. Choose your output. Pick the raw Base64, the data:image/jpeg URI, a CSS rule, or an <img> tag.
  3. 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

よくある質問

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.

その他の画像ツール