pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

base64-encode Encode text as Base64

{ } Encode
Input0 chars
Output0 chars

Examples

Encode credentials for a Basic auth header

Usage
"username:password123" | base64-encode

Encode a JSON payload to embed in a URL parameter

Usage
"{"event":"signup","user":"[email protected]"}" | base64-encode

Encode a message for sharing through a restrictive system

Usage
"Confidential: Q4 revenue projection is $2.4M" | base64-encode
View source
(input)=>{
                try {
                    return btoa(unescape(encodeURIComponent(input)));
                } catch (e) {
                    return `Error: ${e.message}`;
                }
            }