Skip to main content
ZEKILO Dev

Base64 Encode & Decode

Turn text or a file into Base64, or turn Base64 back into the original.

Stays in your browserRFC 4648As of 2026.10.03

Text or file

Press Esc, then Tab to leave the editor.

Base64

How to use Base64 Encode & Decode

  1. 1Choose a direction (Encode or Decode), then paste text into the input panel or press Sample. To use a file, press Open file or drop it on the panel.
  2. 2When encoding, choose the alphabet (Standard or URL-safe), padding, and line wrap. The result updates as you go.
  3. 3Press Copy to copy the result or Download to save it. Swap moves the result to the input and reverses the direction.

Base64 Encode & Decode options

Direction
Encode turns text or a file into Base64. Decode turns Base64 back into the original. The direction is never guessed. The tool does what you select.
Alphabet
Standard uses + and /. URL-safe uses - and _ instead. This applies to encoding only. Decoding reads both forms.
Padding (=)
Fills the end with = so the length is a multiple of 4. Padding is on by default for Standard and off by default when you choose URL-safe.
Line wrap
None (default), 76 characters (MIME), or 64 characters (PEM). A line break is inserted after that many characters.

The Base64 standard and how this tool behaves

This tool follows Base64 as defined in RFC 4648. Every 3 bytes (24 bits) are split into four 6-bit groups and written with A–Z, a–z, 0–9, and two more characters (+ /, or - _). When the byte count is not a multiple of 3, the end is filled with =. The result is therefore about 33% longer than the original.

When decoding, spaces and line breaks are ignored, +/ and -_ are both read even when mixed, and missing padding is accepted. Any other character is reported with its position. If the character count leaves a remainder of 1 when divided by 4, no bytes can be formed from the last character, so it is reported as a length error.

For line wrap, 76 characters is the line length of MIME (RFC 2045) and 64 characters is the line length of PEM (RFC 7468).

Base64 is not encryption

Base64 is an encoding, not encryption. Anyone can turn it back into the original. It exists to carry binary data through places that only accept text, such as mail bodies, JSON, URLs, and HTML attributes. It is not a way to hide content. An HTTP Basic authentication header and the payload of a JWT are only Base64, so anyone who sees the value can read what is inside.

Base64 Encode & Decode examples

  • Encode plain text

    Input

    ZEKILO

    Output

    WkVLSUxP
  • Encode Korean text (UTF-8)

    Each Hangul syllable is 3 bytes in UTF-8, so three characters (9 bytes) become 12 Base64 characters.

    Input

    제킬로

    Output

    7KCc7YKs66Gc
  • Encode Japanese text (UTF-8)

    Input

    ゼキロ

    Output

    44K844Kt44Ot
  • Decode Base64 without padding (=)

    Direction: Decode. The missing = at the end is accepted.

    Input

    WkVLSUw

    Output

    ZEKIL
  • A character that is not Base64

    Direction: Decode

    Input

    WkVLSUxP!

    Output

    Character 9 ('!') is not a Base64 character.

Examples use the reference cases this tool is tested against.

Base64 Encode & Decode: frequently asked questions

Is my input sent to a server?

No. Your input and the result are processed only in this browser and are not stored. Reloading the page clears them.

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can turn it back into the original. Encoding a password or an API key in Base64 does not hide it, so encrypt values that must stay secret, or store them as hashes.

What is the difference between Standard and URL-safe?

Only the last two characters differ. Standard uses + and /, and URL-safe uses - and _. URL-safe output can go into a URL or a file name as is, and it is often written without the trailing = padding, as in a JWT.

Why does decoding show binary data instead of text?

When the decoded bytes are not valid UTF-8 text, they are not shown as characters. You get the byte count, a hex preview of the first 64 bytes, and the detected format (PNG, JPEG, GIF, PDF, or ZIP), and Download as file saves the original file.

How large a file can I encode?

Files up to 10 MB are processed right away. Above that, press Run to process them. The maximum is 50 MB. Pasted text is processed as you type up to 1 MB, with a maximum of 20 MB. Large inputs are processed in the background so the page stays responsive.

How it works · Standards

  • Processed in: this browser (your device). Nothing is sent or stored.
  • Standards: RFC 4648
  • Engine: ZEKILO Dev Base64 codec (in-house code)
  • Text is converted to UTF-8 bytes before it is encoded.
  • Copy as Data URL appears after you encode a file. A Data URL always uses the standard alphabet with padding, whatever the options are.
  • A file opened in the Decode direction is read as a text file that contains Base64.
  • As of 2026.10.03
  • Changelog: 2026.10.03 First release
Open-source licenses →
Something wrong with the result? Report an issue(Your input is not attached)