Base64 Encoder & Decoder
Encode text and images to Base64, or decode a Base64 string back to its original form.
- Encoders & Formatters
- Free
- No sign-up
Text and images are both encoded entirely in your browser — nothing is uploaded.
Free · Private · Runs in your browser
Why use it
Text and images
Encode plain text, or import an image and get a data URL with ready-made IMG and CSS snippets.
Two-way
Decode any Base64 string back to its original text just as quickly.
Local processing
Files are read and encoded in your browser — nothing is uploaded.
Great for
- Inlining small icons in CSS or HTML as data URLs
- Inspecting Base64 payloads in API responses or JWTs
- Embedding binary data in JSON or config files
How to use
- Paste text, or click Import image to load a file.
- Click Encode to get the Base64 string, or Decode to reverse one.
- Copy the result or download it as a text file.
What Base64 is
Base64 converts binary data into a text-only format using 64 ASCII characters, so it survives transport through systems that expect text — email, URLs, JSON APIs — without being altered.
Why it exists
Many protocols only handle text safely. Base64 lets you embed an image, a file, or arbitrary bytes inside HTML, CSS, or a URL without special characters breaking things.
How it works
- The input is read as raw bytes.
- Bytes are grouped 3 at a time (24 bits) and split into four 6-bit groups.
- Each 6-bit group maps to one character:
A–Z,a–z,0–9,+,/. - When the input isn't a multiple of 3 bytes,
=padding is added so the length stays valid.
Examples
Hello, World!→SGVsbG8sIFdvcmxkIQ==OpenAI→T3BlbkFJ
Questions
Can I encode an image?
Is Base64 encryption?
Why does the output end in = or ==?
29 more free tools, no sign-up
Encoders, generators, media and marketing tools — all right in your browser.
Browse all tools