Skip to content
ToolUlkaa Tool
All tools

Text

Rich Text EditorWord CounterCharacter CounterText ReplacementText Case ConverterSpell CheckerArgument CompilerText to Base64Morse Code ConverterURL Encoder / DecoderJSON FormatterHash GeneratorRegex Tester

Categories

AcademicTextMathematicsStatisticsMachine LearningAIData ScienceFile
All tools
Text

Base64 Encoder and Decoder

Encode text, files or images to Base64, or decode a Base64 string or data URL back to text, an image or a file.

Direction
Source

Base64 output

Base64 is an encoding, not encryption: anyone can decode it.

  1. Tools
  2. Text
  3. Base64 Encoder and Decoder

About Base64 Encoder and Decoder

This free Base64 encoder and decoder converts text, files and images to Base64 and back. It needs no sign-up and runs in your browser, so what you paste or pick is never uploaded.

Base64 writes any data, including binary files, using only 64 safe characters: the letters A to Z and a to z, the digits 0 to 9, plus and slash. That is why it appears wherever binary data has to travel through a text-only channel, such as an email attachment, a JSON field, a data URL inside HTML or CSS, an HTTP Basic Authorization header, or the segments of a JSON Web Token.

Type or paste text and switch on Encode to get the Base64. Switch to Decode and paste a Base64 string, with or without padding, in the standard or the URL-safe alphabet, or even a full data URL, and the tool turns it back into text. If the bytes are an image, a preview appears, and you can download the decoded bytes as a file. Text is handled as UTF-8, so accented letters, Bangla, Chinese and emoji survive the round trip.

Base64 is an encoding, not encryption. Anyone can decode it in a second, so never use it to hide a password or a secret.

How to use Base64 Encoder and Decoder

  1. 1Choose Encode to turn data into Base64, or Decode to turn Base64 back into the original.
  2. 2To encode, type or paste text, or choose File or image and pick a file from your device.
  3. 3Set the options you need: URL-safe (- and _) for tokens and URLs, Keep = padding to include or drop the trailing equals signs, and Data URL to add the data: prefix with the right media type.
  4. 4To decode, paste Base64 or a full data URL. Padding is optional and spaces or line breaks are ignored.
  5. 5Read the result in the Output box. For an image, check the Image preview. For other data, use Download as file to save the decoded bytes.
  6. 6Use Copy to put the result on your clipboard.

Features

  • Encodes and decodes text as UTF-8, so every language and emoji works.
  • Encodes any file or image from your device. It is read in your browser and never uploaded.
  • URL-safe option that uses - and _ in place of + and /, as used by JWT and URL parameters.
  • Padding switch: keep the trailing = signs or drop them.
  • Data URL option that writes data:text/plain;charset=utf-8;base64, or data: with the file media type in front of the result.
  • Decoder that accepts both alphabets, missing padding, whitespace and a data: prefix.
  • Image preview when the decoded bytes are a PNG, JPEG, GIF, WebP or BMP picture.
  • Download of the decoded bytes as a file, for PDFs, images and other binary data.
  • Clear errors: Input is not valid Base64, or Valid Base64 but the bytes are not UTF-8 text.

Worked examples

  • Hello → gives SGVsbG8=

    Five bytes become eight characters. The single = is padding.

  • Hello, World! → gives SGVsbG8sIFdvcmxkIQ==

    Thirteen bytes give 20 characters. Two = signs mean the last group held only one byte.

  • héllo ✓ → gives aMOpbGxvIOKckw==

    Text is encoded as UTF-8 first. The letter é takes two bytes and the check mark takes three.

  • subjects?_d>>>, standard alphabet → gives c3ViamVjdHM/X2Q+Pj4=

    This text produces both + and / in the output.

  • subjects?_d>>>, URL-safe without padding → gives c3ViamVjdHM_X2Q-Pj4

    The same bytes with - and _ and no = sign. This is the form used in JWT.

  • Aladdin:open sesame, as an HTTP Basic credential → gives QWxhZGRpbjpvcGVuIHNlc2FtZQ==

    The example from RFC 7617. The header is Authorization: Basic followed by this value.

How Base64 text starts for common file types

Recognising a file from the first characters of its Base64.
File typeBase64 starts withWhy
PNG imageiVBORw0KGgoThe 8-byte PNG signature
JPEG image/9j/The bytes FF D8 FF
GIF imageR0lGODThe text GIF8
PDF documentJVBERi0The text %PDF-
ZIP archive and Office filesUEsDBThe bytes PK 03 04

Standard Base64 against URL-safe Base64

PropertyStandardURL-safe
Characters 62 and 63+ and /- and _
Padding with =Usually keptUsually dropped
Used inEmail, data URLs, PEM, Basic authJWT, URLs, filenames
Safe in a URL as it isNoYes

Good to know

Why Base64 output is bigger than the input

Base64 turns every 3 bytes into 4 characters, so the output is about 33 percent longer than the input, plus a little padding. A 300 KB image becomes about 400 KB of text. If a data URL is going into a page, that cost, and the fact that the browser cannot cache it separately from the page, is why small images and icons are the sensible use and large photos are not.

What the tool checks when you decode

The decoder removes spaces, line breaks and any data: prefix, accepts the URL-safe characters, and adds missing padding. It rejects characters outside the Base64 alphabet and strings whose length cannot be valid, with the message Input is not valid Base64.

If the string is valid Base64 but the bytes are not valid UTF-8 text, such as a PNG or a PDF, you get a note saying so instead of garbled text. The image preview and Download as file buttons still work for those.

Base64 is not security

There is no key and no secret in Base64. A string that looks scrambled, such as an API token or the middle part of a JWT, is often just Base64 and can be read by anyone. For secrecy you need real encryption. For integrity you need a signature or an HMAC.

Privacy: how it works

  • Your text, files and images are processed by code in your browser tab. Nothing is sent to Ulkaa or to any other server, which you can confirm in the Network tab of your browser developer tools.
  • That matters for Base64 in particular, because people often paste API keys, tokens and private images into these tools. Because there is no upload, there is nothing to leak, but remember that anything you paste into any web page is visible on your screen.

Tips

  • If a decoded result looks like random symbols, the original was probably binary, such as an image or a PDF. Use Download as file instead.
  • A string that starts with eyJ is very likely Base64 for a JSON object that begins with {". JWT parts do.
  • Pasting a JWT part? The segments are URL-safe Base64 without padding. Decode each of the dot-separated parts on its own.
  • To embed a small image in CSS or HTML, choose File or image, tick Data URL, and paste the result into src or url().

Frequently asked questions

Is it really free?

Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.

Do I need an account?

No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.

Does it run in my browser?

Yes. Your text and files are processed by code running in your browser tab, on your own device.

Is my data uploaded?

No. Your text and files are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.

What is Base64 encoding?

It is a way to write binary data using 64 printable characters. Every 3 bytes become 4 characters, so the data can travel through systems that only handle text, such as email or JSON.

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it, so it does not protect secrets.

How do I decode Base64?

Choose Decode and paste the Base64 string. Padding is optional and a data: prefix is accepted. The tool shows the text, an image preview if the bytes are a picture, and a button to download the bytes.

Why does my Base64 end with = or ==?

Padding. Base64 works in groups of 3 bytes. If the last group has 2 bytes it ends with one =, and if it has 1 byte it ends with two. URL-safe Base64 often drops the padding, and this tool lets you drop it with the Keep = padding option.

What is URL-safe Base64?

A variant that replaces + with - and / with _ so the string can sit in a URL or filename without percent-encoding. JSON Web Tokens use it.

Does it work with emoji and non-English text?

Yes. Text is converted to UTF-8 bytes before encoding, and decoded the same way. The result is the same as in most programming languages that use UTF-8.

Why does decoding say the bytes are not UTF-8 text?

The string is valid Base64, but what it holds is binary data, such as an image or a compressed file, not text. Use the image preview or Download as file.

How do I convert an image to Base64?

Choose Encode, then File or image, and pick the image. Tick Data URL to get a string that starts with data:image/png;base64, (or the matching type) that you can paste into HTML or CSS.

Popular Base64 Encoder and Decoder pages

  • Text to Base64 EncoderType or paste text and get its Base64 encoding straight away.
  • Base64 to Text DecoderPaste a Base64 string and read the text it holds.
  • Image to Base64 ConverterPick an image and get its Base64 string or a data URL ready to paste into HTML or CSS.
  • Base64 to Image DecoderPaste Base64 or a data URL and see the picture it contains.
  • Base64URL EncoderEncode text as URL-safe Base64 using - and _, with or without padding.
  • File to Base64 ConverterPick any file and get its contents as a Base64 string.

Ulkaa Apps

  • Ulkaa
  • Calendar
  • Task
  • Note
  • Disk
  • Call
  • Contact
  • Mail
  • Finance
  • Health
  • Office
  • Work
  • Workspace
  • Halum
  • Jaal
  • Islam
  • Game
  • Weather
  • Campus
  • News
  • Developer
  • Help
  • Account
About·Privacy·Terms·© 2026 Ulkaa

What is Ulkaa Tool?

Ulkaa Tool is a free collection of fast, privacy-friendly online tools from Ulkaa Network. Calculate your GPA and CGPA, edit rich text, count words and characters, replace text and more — all in your browser.

Every tool runs entirely in your browser — no sign-up, and your data never leaves your device.

Academic

  • GPA Calculator
  • CGPA Calculator
  • Citation Generator
  • Quiz Maker

Text

  • Rich Text Editor
  • Word Counter
  • Character Counter
  • Text Replacement

Ulkaa

  • Ulkaa
  • Ulkaa News
  • Ulkaa Campus
  • Ulkaa Tool
  • Ulkaa Game
  • Ulkaa Weather
  • Ulkaa Islam

Company

  • About Ulkaa
  • Careers
  • Support
  • Help
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Sitemap

© 2015-26, Ulkaa. All rights reserved.
Facebook PageLinkedIn CompanyX (Twitter) ProfileInstagram ProfileGitHub Account