Base64 encode and decode online
Type or paste text to get its Base64 for free, or switch to decoding to read a Base64 string. Text is converted as UTF-8, so “é”, “ß” and “👋” come back exactly as they went in.
Free, no sign-up, no limit Runs in your browser: your text and files are never sent or saved.
Base64 encode and decode
Or drop a file to encode it in Base64 (image, PDF, font…)
How to use it
- Choose the direction: encode (text → Base64) or decode (Base64 → text).
- Type or paste your content, or drop a file to encode it. The result updates as you type.
- For encoding, tick “Base64 URL” for tokens and URLs, or “76-character lines” for e-mail (MIME). Then copy or download the result.
Example
Input
Hello, world! 👋
Output
SGVsbG8sIHdvcmxkISDwn5GL
Good to know
- Base64 is an encoding, not encryption: anyone can decode it.
- Decoding ignores spaces and line breaks, and accepts both alphabets (+/ and -_) with or without the final “=”.
- When the decoded content is not text (an image, a PDF…), the tool offers it as a file to download instead of showing unreadable characters, with a preview for images.
- Files up to 10 MB can be encoded; nothing is uploaded.
Frequently asked questions
How do I decode a Base64 encoded string?
Choose “Decode”, then paste the string: the text appears as you type. Spaces and line breaks are ignored, both the standard (+/) and URL (-_) alphabets are accepted, and a missing “=” at the end is tolerated. If a character is not allowed, the error gives its position.
How do I decode Base64 on Linux, PowerShell or in Python?
On Linux or macOS: echo "SGVsbG8=" | base64 --decode. In PowerShell: [Text.Encoding]::UTF8.GetString([Convert]::FromBase64String("SGVsbG8=")). In Python: base64.b64decode(s).decode("utf-8"). This page gives the same result without opening a terminal.
Is Base64 a form of encryption?
No. Base64 only rewrites bytes with 64 printable characters so they survive e-mail, JSON or a URL; anyone can decode it in one click. To protect a secret, encrypt it; to check that a text has not changed, compute a hash.
Why is my Base64 longer than the original text?
Base64 turns every 3 bytes into 4 characters, so the result is about a third longer, plus “=” padding at the end. Accented letters and emojis take 2 to 4 bytes in UTF-8, which is why “👋” alone becomes 8 characters.
What is URL-safe Base64?
A variant (RFC 4648) that uses “-” and “_” instead of “+” and “/”; the final “=” is usually dropped too, which the RFC allows when the length is known, so the string can go into a URL or a file name without escaping. JWT tokens use it. Tick “Base64 URL” when encoding; decoding detects it automatically.
Can I decode a Base64 image or PDF?
Yes: when the decoded bytes are not text, the tool recognizes common formats such as PNG, JPEG or PDF and offers the file to download. To turn an image into Base64 or a data URI, use “Image to Base64”, since this page encodes text only.
Sources
- IETF, RFC 4648: The Base16, Base32, and Base64 Data Encodings
- IETF, RFC 2045: MIME Part One, Format of Internet Message Bodies (76-character lines)
Checked on November 26, 2026