Base64 encoder and decoder

Size: bytes Keys: Depth:

        

Base64 encoder and decoder

bytes →


        
    

Base64 encoder and decoder

Query parameters

IDN / Punycode


    

Base64 encoder and decoder

..

Header


    

Payload


    

Metadata


        
    

Verify signature

Sign (HS)


            

Base64 encoder and decoder

Pattern library

Highlighted matches

Matches ()

Replacement result


    

Base64 encoder and decoder

Relative:

Timezone

Build from parts


        
Day of year: Week: Weekday:

Difference


        

Base64 encoder and decoder


    

Base64 encoder and decoder

Base64 encoder and decoder


        
    

Examples

Input text

Hello, World!

Base64

SGVsbG8sIFdvcmxkIQ==

Base64 Guides & articles

Base64 encoder and decoder

Encode and decode Unicode text with optional URL-safe output. DevToolGrid Online offers a free Base64 encoder and Base64 decoder online.

What is Base64?

Base64 is an encoding scheme that represents binary data as ASCII text using 64 characters (A–Z, a–z, 0–9, + and /). It is widely used to embed images in CSS or HTML, carry binary data inside JSON or email, and store small files as text. Base64 is encoding, not encryption — it does not protect or hide data.

How to encode and decode Base64

  1. 1 Paste text into the input panel, or pick a file to encode.
  2. 2 Click Encode to convert to Base64, or Decode to read Base64 back.
  3. 3 Enable URL-safe if the value will be used in a URL or filename.
  4. 4 Copy the result, preview images, or download the decoded bytes.

Common Base64 mistakes

  • Wrong paddingStandard Base64 is padded with = so its length is a multiple of 4. Removing or adding padding breaks decoding.
  • Standard vs URL-safeURL-safe Base64 replaces + and / with - and _. Decoding URL-safe data with a standard decoder fails.
  • Treating it as encryptionBase64 is fully reversible by anyone. Never use it to protect passwords or secrets.

Base64 vs Base64URL

Standard Base64 uses + and / and = padding, which are unsafe in URLs and filenames. Base64URL replaces + with -, / with _ and usually drops the padding, so the result is safe to place in query strings, JWTs and file names. This tool supports both with a single toggle.

FAQ

Is this tool free?

Yes. The Base64 encoder and decoder is completely free, with no sign-up or limits.

Is my data sent to a server?

No. Encoding and decoding run locally in your browser, so files and text never leave your device.

Can it encode files and images?

Yes. Drop a file to get Base64, build a data URI, and preview images directly in the browser.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / so the value can be used safely in URLs, filenames and tokens.